-- Tim Nagel <[EMAIL PROTECTED]> wrote
(on Monday, 27 October 2008, 02:47 PM +1100):
> I am trying to override the ErrorHandler plugin and I have run into an issue:
>  
> I have created a plugin, Infinite_Controller_Plugin_ErrorHandler, derived from
> Zend's copy, and if i register the plugin at stack position 100 (as the 
> current
> one is done in the Front Controller), I'll get an exception thrown that there
> is already a plugin registered there when I dispatch.
>  
> So:
>  
> 1) Am I doing it wrong? Should I be registering it earlier? 99 instead of 100?
> Seems an aweful waste to load 2 ErrorHandlers.
> 2) Should I be setting noErrorHandler to avoid the Front Controller from
> creating a Zend_Controller_Plugin_ErrorHandler? Seems like this wouldnt be the
> solution to me

This is exactly the solution.

> 3) Should I be overriding the Front Controller as well? Also seems a bit much
> to change the ErrorHandler.
> 4) Is there an issue with the Plugin Broker that it is purely checking the
> class type in hasPlugin, rather than checking for instanceof?

It's not an issue; it's simply the original design of the broker. It
existed before we solidified our plugin architecture.

> 4.1) Should there be a feature or bug request to modify the dispatch function
> in the Front Controller to use a class variable for where it should look for
> the ErrorHandler?

That's what solution 2 is doing, in essence. ;)

> Any guidance would be appreciated.

-- 
Matthew Weier O'Phinney
Software Architect       | [EMAIL PROTECTED]
Zend Framework           | http://framework.zend.com/

Reply via email to