I have a script where I have two objects of two different classes, call them Object A and Object B. Object A has a method called Method_A and Object B has a method called Method_B.
When I initialise Object B, I pass a reference to Object A and assign it to $Object_A. So far so good.However, now I have reached a situation where I wish to call Method_A of Object A from within Method_B of Object B. This would result in code that looks something like this :
/*Code starts here*/
function Method_B ()
{
$arbitrary_variable = $this->Object_A->Method_A();
}
/*Code ends Here*/
My question now is: Will the code above work or will PHP tell me to &*^% off?
Regards
Roardood
When I initialise Object B, I pass a reference to Object A and assign it to $Object_A. So far so good.However, now I have reached a situation where I wish to call Method_A of Object A from within Method_B of Object B. This would result in code that looks something like this :
/*Code starts here*/
function Method_B ()
{
$arbitrary_variable = $this->Object_A->Method_A();
}
/*Code ends Here*/
My question now is: Will the code above work or will PHP tell me to &*^% off?
Regards
Roardood