Re: protected __call() question
| From: | Marcus Boerger | Date: | Thu, 08 Apr 2004 07:40:33 +0000 |
| Subject: | Re: protected __call() question | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-8985@lists.php.net to get a copy of this message | ||
Hello Christian,
Thursday, April 8, 2004, 8:09:20 AM, you wrote:
> Jochem Maas wrote:
>> I'm happy to just remove the P and add it again if ever that becomes an
>> option.
> Or go for the simpler option: Just don't use P.
> An addition to the documentation of __call saying that it has to be
> public makes sense though. The meaning of PPP on __call would be
> confusing anyway: Does it mean the implementation of __call or the
> visibility of the 'virtual' functions being called. I'd assume the
> first but people _will_ get confused.
Methos __call works as a proxy for the non existing/virtual methods
hence i expect it's visibility makes the visibility of the virtual
methods. If we want different visibility for the handled methods then
we probably need a new keyword 'virtual' tha allows to declare a
virtua methods visibility. Thats by the way also usefull for the
virtual properties handled by __get/__set.
> And I think __call has such few uses (I can think of one class right
> now: Object proxies for SOAP/ XMLRPC or the like) that you will hardly
> redeclare it anyway. If you start using __call on a regular basis you
> should probably rethink your design :-)
An iterator may want to "reflect" it's inner object/iterator methods
by call. This you may cal aggregation. In other words you can use
__call to emulate MI and aggregation.
--
Best regards,
Marcus mailto:helly@php.net