Re: autoload, include_once naming conventions

From: Date: Wed, 16 Mar 2005 22:40:01 +0000
Subject: Re: autoload, include_once naming conventions
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-36711@lists.php.net to get a copy of this message
Hi, Lukas Smith schrieb:
just a note: generally however I dont want to take away the power of include_path though. its very nice way for the user to stick an include_path infront of the pear path to easily override code from pear.
Of course not! That's always the fallback. But a classloader allows you to define an include path per package from your PHP script. If you do not use it, it will automatically do require 'XML/Util.php' or whichever class you load. Using the include path changes it for _all_ includes, using a classloader allows you to define: DB drivers are located in /my/custom/DB, Date_Holidays drivers are located in /var/www/mysite/ and Log drivers are located in /home/schst/test/Log. As it does not cost more than a few lines of code, I think this would be a nice addition. Stephan -- http://www.php-tools.net http://www.schst.net http://pear.php.net

« previous php.pear.dev (#36711) next »