-- Greg dev...@gmail.com wrote
(on Thursday, 25 August 2011, 11:55 AM -0500):
Thats not true. Autoloaders that are shipped with code should only
be responsible for loading the code they are responsible for (in the
least).
Ok, I can agree with that. But thats were overheads can occur
-- Greg dev...@gmail.com wrote
(on Wednesday, 24 August 2011, 09:29 PM -0500):
Hi Matthew,
My point, or preference is, is that we should try and encourage only
registering one autoloader handler for the application.
Why, exactly? What problem does this solve?
This is in fact how the
Hi Matthew,
Again, why is this a problem, exactly? What if you have another
autoloader registered later that _can_ handle it?
If the first dedicated autoloader for that namespace couldn't handle
it, chances are no other handler will (or should not).
But spl_autoload _IS_ a stack
I
Again, why is this a problem, exactly? What if you have another
autoloader registered later that _can_ handle it?
If the first dedicated autoloader for that namespace couldn't handle
it, chances are no other handler will (or should not).
Thats not true. Autoloaders that are shipped with code
Hi Ralph,
Thats not true. Autoloaders that are shipped with code should only be
responsible for loading the code they are responsible for (in the least).
Ok, I can agree with that. But thats were overheads can occur
depending on the implementation of the rest of the spl registered
handlers.
I think you might have meant to post this to the zf-contributors
maillist where most ZF2 discussions are happening.
if (false === class_exists('ClassA')) { //dynamically check to see if
a local overriding class exists via the autoloader
$class = new DefaultClass();
} else {
$class = new
Hi Ralph,
if (false === class_exists('ClassA')) { //dynamically check to see if
a local overriding class exists via the autoloader
$class = new DefaultClass();
} else {
$class = new ClassA();
}
What is an overriding class?
In the above 'overriding' is the 'preferred' class to use,
-- Greg dev...@gmail.com wrote
(on Wednesday, 24 August 2011, 07:34 PM -0500):
if (false === class_exists('ClassA')) { //dynamically check to see if
a local overriding class exists via the autoloader
$class = new DefaultClass();
} else {
$class = new ClassA();
}
What is
Hi Matthew,
My point, or preference is, is that we should try and encourage only
registering one autoloader handler for the application.
Why, exactly? What problem does this solve?
This is in fact how the StandardAutoloader (PSR-0 implementation) in ZF2
works -- you register explicit