Re: [fw-general] Multiple spl_autoload registered handlers

2011-08-30 Thread Matthew Weier O'Phinney
-- 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

Re: [fw-general] Multiple spl_autoload registered handlers

2011-08-25 Thread Matthew Weier O'Phinney
-- 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

Re: [fw-general] Multiple spl_autoload registered handlers

2011-08-25 Thread Greg
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

Re: [fw-general] Multiple spl_autoload registered handlers

2011-08-25 Thread Ralph Schindler
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

Re: [fw-general] Multiple spl_autoload registered handlers

2011-08-25 Thread Greg
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.

Re: [fw-general] Multiple spl_autoload registered handlers

2011-08-24 Thread Ralph Schindler
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

Re: [fw-general] Multiple spl_autoload registered handlers

2011-08-24 Thread Greg
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,

Re: [fw-general] Multiple spl_autoload registered handlers

2011-08-24 Thread Matthew Weier O'Phinney
-- 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

Re: [fw-general] Multiple spl_autoload registered handlers

2011-08-24 Thread Greg
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