Hello Stanislav,
Monday, June 30, 2008, 12:20:15 AM, you wrote:
> Hi!
>> * Class::__invoke() to allow functors[1]. The class "Closure" in
>> your proposal should also implement that method to make
>> method_exists() and ext/reflection behave.
>> * Change the behaviour how method calls are resolved. Method calls
>> on invokable objects (closures or functors) should work.
> And to close the circle, add __invoke to ReflectionFunctionAbstract and
> implement it in Reflectionfunctiom and ReflectionMethod (here we might
> have trouble with specifying object, so need to do some thinking on it -
> maybe we'll need another class or augment ReflectionMethod somehow?)
Actually a pretty good idea :-) Callable comes to mind if we really need
more names. But a ReflectionMethod could be a static method as well as a
static closure. So I think it should throw an exception in case an
instance is missing, just as it would do for non static methods.
marcus
>> echo $view->escape("<script>alert(1)</script>");
> If we use this syntax, and $view->escape is not defined, should we call
> __call or __get?
> --
> Stanislav Malyshev, Zend Software Architect
> [EMAIL PROTECTED] http://www.zend.com/
> (408)253-8829 MSN: [EMAIL PROTECTED]
Best regards,
Marcus
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php