Classes and Functions
Posted on 2003-11-18
I have 2 classes, Results_Parser, and Engine_Data.
The Results_Parser class will take some data and parse it out into usable data formats. One of the data formats is form_data. The Engine_Data class has a need to access the information in Results_Parser->form_data. This is done using a function inside of Engine_Data, called get_engine_hits. How can I get the class Engine_Data to look at something in Results_Parser->form_data?
Caveats: Cannot instantiate Results_Parser in Engine_Data, it's not relevant.
Do not want to have to instantiate Engine_Data inside Results_Parser, the code will get unnecessarily convoluted that way. It is the simple matter of being able to pass data from one class to the other.
Additional info: Results_Parser->form_data may or may not exist. What I need it the function insdie of Engine_Data to do is to check if Results_Parser->form_data exists. If it does, then to use it. If not, then to use other data NOT generated within Results_Parser.