Re: __call interceptor and static methods

From: Date: Mon, 08 Nov 2004 10:45:24 +0000
Subject: Re: __call interceptor and static methods
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-13784@lists.php.net to get a copy of this message
Hello Stanislav, Monday, November 8, 2004, 11:29:13 AM, you wrote: 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. Adding an argument would be a major BC but sure is_null($this) would work, only it would be another big slowdown. 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? I didn't say it is necessary :-) __static_construct would be called the first time the class is going to be used. Best regards, Marcus mailto:helly@php.net

« previous php.internals (#13784) next »