Re: __call interceptor and static methods
| From: | Stanislav Malyshev | Date: | Mon, 08 Nov 2004 10:29:13 +0000 |
| Subject: | Re: __call interceptor and static methods | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-13783@lists.php.net to get a copy of this message | ||
MB>> you won't be able to tell from inside __call() whether a static or
MB>> non static method was meant.
Technically, it's not a big problem IMO - there could be an argument added
or some other solution, like presence of $this.
MB>>non static method was meant. The same holds for __get() and __set().
MB>>Also if we start using such code we'd need a class constructor. Thus
MB>>this dicussion is leading to the following set of new magics:
MB>>
MB>>__static_get
MB>>__static_set
MB>>__static_call
MB>>__static_construct
What do you mean by __static_construct? When do you expect it to be
called? And, BTW - if you need to override method calls, etc. for a
global object, why not to use singletons?
--
Stanislav Malyshev, Zend Products Engineer
stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115