-- Simeon Goranov <[email protected]> wrote (on Wednesday, 04 November 2009, 10:37 AM +0200): > В 09:57 +1000 на 04.11.2009 (ср), Brenton Alker написа: > > Simeon Goranov wrote: > Thanks for the code ! > I'm wondering what to do if I've got code which is specific for one the > modules. I mean something like checking for authorization in admin > module, for example. What is the best practice to resolve this > situation ? > Using plugins, extend each of the controllers from admin with a class > like Admin_Bootstrap_Controller or there is another solutions ?
I'd have the module's bootstrap register a plugin with appropriate hooks (dispatchLoopStartup() and/or preDispatch()), and examine the request object to determine if that module is requested. -- Matthew Weier O'Phinney Project Lead | [email protected] Zend Framework | http://framework.zend.com/
