I have a method which returns a class and want to call a method on it. Instead of
$theClass = $this->getClass();
$theClass->foo();
I would like to write
$this->getClass()->foo();
Is there a syntax for this as of PHP4?
This works:
$this->{$this->getClassName()}->foo();
But I would like to manipulate the class beforehand (I do this now in getClass()).