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 explic

Re: [fw-general] Multiple spl_autoload registered handlers

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

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'

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 C

Re: [fw-general] [Zend_Form_Element] Own decorator vanishes if no prefix given. Bug or misuse?

2011-08-24 Thread Matthew Weier O'Phinney
-- Hauke Stange wrote (on Wednesday, 24 August 2011, 06:38 PM +0200): > I just spent hours with searching why my decorator doesn't get called. I > use the Zend_Form stuff separately for testing purposes and wrote an own > decorator for some elements. > > In my form class I use the following lines

[fw-general] [Zend_Form_Element] Own decorator vanishes if no prefix given. Bug or misuse?

2011-08-24 Thread Hauke Stange
Hi, I just spent hours with searching why my decorator doesn't get called. I use the Zend_Form stuff separately for testing purposes and wrote an own decorator for some elements. In my form class I use the following lines of code to register and use my decorator: $this->addElementPrefixPath(