Re: __autoload proposal

From: Date: Sun, 23 Dec 2007 04:23:53 +0000
Subject: Re: __autoload proposal
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-34230@lists.php.net to get a copy of this message
Now __autoload have only one argument which is a name of searched class. Second argument could be a namespace where class is searched. It should have default value for backward compatibility.
What for? It always receives full name of the class, whatever it is.
I think it is the most flexible solution. It allows to create very useful and effective mapping mechanisms.
I don't see any reason to complicate the API - if you need it in your autoload, you can easily split the full name into parts before and after the final :: and achieve the same effect. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

« previous php.internals (#34230) next »