Re: Re: [Zend Engine 2] RE: [PHP-DEV] REPOST: Class Autoloading [PATCH]

From: Date: Wed, 12 Jun 2002 17:53:00 +0000
Subject: Re: Re: [Zend Engine 2] RE: [PHP-DEV] REPOST: Class Autoloading [PATCH]
References: 1 2 3  Groups: php.dev 
Request: Send a blank email to php-dev+get-85171@lists.php.net to get a copy of this message
> First of all I'd prefer it to call a predefined callback called > __autoload() if a class is not found. I do not have a problem with the predefined name. However, unserialize is already using the ini setting for the same thing, and it would be a shame to introduce an inconsistency. Can we obey the ini setting if it is there, and call __autoload() if it isn't (i.e. introduce "__autoload" as a default value for the ini parameter)? > The second problem is that I don't see it working with nested classes. > Is it good enough to only have this work with classes in the global scope? I am not really familiar with nested classes; is it because you don't know the name of the file in which a nested class is located? If so, I would say that trying to accommodate that would be an overkill. In any case, the programmer using nested classes can always write the __autoload() function that will be smart enough. -- Ivan Ristic, ivanr@webkreator.com [ Weblog on PHP, Software development, Intranets, and Knowledge Management: http://www.webkreator.com ]

« previous php.dev (#85171) next »