>
>>
>> What are peoples' thoughts on the name of the class? The word "auto"
>> fits best with all that has come before, yet the proposal here uses
>> "class": what about SplAutoloader? With the introduction of this new
>> class, whatever the name, what happens to __autoload() and
>> spl_autoload_register(), if anything? How many ways do we want/need to
>> load a class?
>
>
> I believe by calling a class SplAutoloader when there is already an
> implementation of spl_autoload that does something very different it would
> be advised to not name it of the same sort... this is what people would
> start to think about. The name SplClassLoader is much more specific. If we
> needed to keep the word "Auto" it would seem better named
> SplClassAutoLoader.
>
> spl_autoload is completely separate from __autoload today. Also __autoload
> does differ from the spl_autoload facility in several ways and is not
> recommended even from the manual standpoint: www.php.net/autoload.
> Secondarily; a class loader cannot autoload functions - it is made to only
> implement PSR-0 and nothing more. While you may use spl_autoload to load
> classes the implementation can also load in functions. This class is really
> just enforcing a specific standardization.
>
I've started toying around with adjusting the patch. A bit of rewrite
is required but I'm attempting to modify the patch to be included
directly in SPL with the name SplClassLoader so that one can do:
$cl = new \SplClassLoader(..., ...);
Once the patch is adjusted to fit with SPL, we can revisit the name
however it is going to be used.
--
David Coallier
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php