In addition, I think that the hook syntax has to be changed into the
"call_user_func" one (instead of... "$obj->foo()" do array($obj, 'foo') )
I think the current syntax is fine. Keep in mind, you can use wildcards
in that syntax, I do in my application, for example:
// before all controller actions
aop_add_before(
'MySite\Controller\UserController->*Action()',
array($this, 'adviseUserController')
);
Also, the object has not been created yet (there is no $obj), but I know
I want to catch particular objects by a particular type. I do not know
what currently happens if I keyed on an instanceof instead of an exact type.
I don't think you can successfully translate a wildcard match to a
callable array and have the same meaning conveyed as clearly.
What I don't want is a more complex syntax than that is already supported.
-ralph
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php