Hi,
I see what you mean and I have to agree, but given my current file
organization at the moment I would require some that doesn't change
file names :S
Also another solution that I thought about was having a config array
with the location of the files.
$ClassArray[$name] = $path;
if (array_key_exists($name, $ClassArray)){
require($ClassArray[$name]);
}
A simple shell script would fill the array and the people could had
more class's during development,
this would free up memory usage to only required code, and simplify
the class loading using __autoload
On 9 Set, 18:11, Robert Gonzalez <
robert.anthony.gonza...@gmail.com>
wrote:
> PHP has a default autoload stack and process it follows when a class name is
> called that has not yet been defined in the script. Making PHP find the file
> you want to load the class from is expensive, and the more work it has to do
> during the find, the longer it will take to process your code.
>
> Generally I use a single static class method to handle my loading, and I
> always names classes along old-school "namespace" rules (a la Zend
> Framework) so the logic in loading is pretty stripped down and loads files
> pretty fast. If you are going to put a lot of searching and such in your
> loader expect your process times to get bigger.
>