Hi
Could anybody tell me how I can use an objects method if I got the object as a result of another method?
Example:
Instead of doing
$obj=object->getAnotherObject();
$obj->methodX();
I want to do $object->getAnotherObject()->methodX();
While I'm using this all the time in Java I can't get it working this way with PHP?
Any help would be apreciated.
Thanks
Could anybody tell me how I can use an objects method if I got the object as a result of another method?
Example:
Instead of doing
$obj=object->getAnotherObject();
$obj->methodX();
I want to do $object->getAnotherObject()->methodX();
While I'm using this all the time in Java I can't get it working this way with PHP?
Any help would be apreciated.
Thanks