Stanislav Malyshev wrote:
MB>>  but that is a way of having __call that obviously doesn't fit the real
MB>>world. In a real world application i only implement a few things with call
MB>>and dislike having all the others implemented automatically also. And the
MB>>i have to care about error generation while the engine could help me a lot
MB>>so that my error messages look and behave just like they would if there
MB>>is no __call. But that would indeed require some __exists() or
MB>>__implemented() support().

Nothing prevents you from having __implemented or __whateveryoulike. However, I don't see how engine could know beforehand if your __call would succeed or not, so __implemented has no relation whatsoever to __call, unless you make this relation in your code - and engine can't know you did.

I think its obvious that you can implement things in userland or inside the engine. The main advantage of doing it inside the engine is that it then becomes the standard way of doing things, where as with userland its likely that several competing "standards" will emerge. Not because of real advantages, but just because of lack of a central standard.

However maybe its sufficient to just have an interface that defines the signature of such a "check if method is implemented by __call()" method along with a bit of text. That should imho be a sufficient approach. Without the need of adding yet another magic method to the engine itself.

regards,
Lukas

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to