On 20 Oct 2008, at 21:06, Christoph Boget wrote:
Why can't it be a separate class,
In general, it can. In my case, it can't. Not unless I want to
completely duplicate an already existing class.
Create your singleton class without extending the class you need to
extend. Create an instance of that class in your object. Implement the
__call magic method to proxy function calls through to that instance
throwing an exception (or error) if the method requested doesn't
exist. Not particularly pretty, but definitely simple.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php