Re: autoload, include_once naming conventions

From: Date: Sat, 19 Mar 2005 04:59:52 +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-36757@lists.php.net to get a copy of this message
Would it not be a more direct solution, to implement a __include_path_handler(), so you could redirect to your hearts content, without affecting the original code, or the intent of the original code? Regards Alan On Fri, 2005-03-18 at 08:30 +0100, Lukas Smith wrote: > Daniel Convissor wrote: > > > 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. > > If we dont clean those naming conventions then nobody can use > __autoload() anyways. > > To me the naming convention is quite simple: > Any public class needs to be in its own file that matches the "_" => "/" > > style. Classes that should not be intantiated by the users needs to be > structured so that the code that may instantiate that class already > includes that class or that file also needs to match the "_" => "/" > naming style. > > Alot of people have been working on cleaning up their code. We still > have a few problem packages like "Var_Dump" etc .. It all seems quite > fixable to me. > > regards, > Lukas > -- Alan Knowles <alan@akbkhome.com>

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