I don't think this is supported, but I just want to make sure:
Say we have classes a & b that are pre-defined. Class a has a method (getSomething) that returns an object of class b. Class b has a method (getName) that returns some (name) property.
$aObject = new a();
This doesn't seem to work:
$aObject->getSomething()->getName();
Is this correct? If not, what am I doing wrong? Is there an elegant solution other than:
$foo = $aObject->getSomething();
$foo->getName();
Thanks in advance.