Assign the object to a temporary variable, and then call the method of that temporary variable:
$orange = $fruit->get('citrus'); $orange->peel( );
This is necessary because a parse error results from:
$fruit->get('citrus')->peel( );
Zend Engine 2 supports direct dereferencing of objects returned from a method so this workaround is no longer necessary.
Copyright © 2003 O'Reilly & Associates. All rights reserved.