-- Guillaume ORIOL <[email protected]> wrote (on Wednesday, 16 December 2009, 09:33 PM +0100): > I wonder why, in a modular application, all module bootstraps are > executed during initialization and not only the one corresponding to > the matched module? > > What would be the way to get only one of them executed (I would like > to connect a different plugin to each module)?
All module bootstraps are executed... because at bootstrap time, the requested module is not yet known. (It happens during _routing_.) Module bootstraps should be used for: * Setting up autoloading of module resources (happens already, automatically) * Performing any module-specific tasks that need to happen on every request * Registering module-specific plugins This latter area is where you should execute code that should only be executed if the module is the one requested. -- Matthew Weier O'Phinney Project Lead | [email protected] Zend Framework | http://framework.zend.com/
