Re: __call overload detection

From: Date: Wed, 04 Jan 2006 01:37:57 +0000
Subject: Re: __call overload detection
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-21388@lists.php.net to get a copy of this message
On Tue, Jan 03, 2006 at 03:44:33PM -0800, Mike Naberezny wrote: > I see your point with detection by something like __is_callable(), although > I can't personally think of a place where I'd use it. Consider a situation where a proxy/mediator/broker class implementing __call proxyies method calls to other classes (possibly of 3rd party origins), which themselves may or may not implement __call. You'd like the broker itself to have a consistent behavior for the sake of its users and good clean code. That's very difficult if the classes it's proxying for can't agree on a consistent behavior. The result might be lots of special cases in various levels of code, not to mention the possibility of a fatal error if any of the __call implementations try to behave like the language does. A change in the language could eliminate the ambiguity. Regards, Andrew -- Andrew Yochum Plexpod andrew@plexpod.com 718-360-0879

« previous php.internals (#21388) next »