$object->methodReturnsObject()->doFoo(); parse error
Posted: Thu Jun 01, 2006 9:15 pm
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/yogler/includes/controllers/page_controller.test.php on line 30
Doing:
works fine.
Why is that? Is there a workaround? I guess I could do $object->other_object->doFoo();...
Doing:
Code: Select all
$method = $object->methodReturnsObject();
$method->doFoo();Why is that? Is there a workaround? I guess I could do $object->other_object->doFoo();...