Re: autoload, include_once naming conventions

From: Date: Fri, 18 Mar 2005 00:30:41 +0000
Subject: Re: autoload, include_once naming conventions
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-36742@lists.php.net to get a copy of this message
Hi Folks: On Wed, Mar 16, 2005 at 06:16:27PM +0100, Lukas Smith wrote: > > Basically what if we would replace all (require|include)_once calls with > a static PEAR method. This method would get a class name passed and > would simply do an class_exists() call and if the class do include the > code by replacing "_" to "/". Yes, the class_exists() will improve performance. But the automatic package name to file name conversion will inevitably run into problems due to misnamed/mislocated packages/classes. This discussion reminds me of the "NameScheme" package that got voted down: http://pear.php.net/pepr/pepr-proposal-show.php?id=82 If we do implement something like this, the method should accept two parameters, the class name and the file name. No magic. Thus, there can be no mistake. Thanks, --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

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