That's ok, but I'm not thinking about implementation now. I think about most logic expected behaviour and how to achieve it.
I want - Common (app) bootstrap - bootstrap resources for entire app. - Per module bootstraps - bootstrap resources required only for specific module. Can I achieve this somehow? Regards, Saša Stamenković On Wed, Jan 27, 2010 at 5:27 PM, Hector Virgen <[email protected]> wrote: > All bootstraps are run because the front controller has not started > dispatching yet, meaning it's too early to tell which module is being > dispatched. > > Imagine a scenario where your admin module's bootstrap creates a new route > for admin pages. Without bootstrapping the module first, the front > controller would have no way of knowing that route or if it matches the > current request. > > Another way to think of it is how would the front controller know if it's > in the admin module without first bootstrapping the module? > > -- > Hector > > > > On Wed, Jan 27, 2010 at 7:07 AM, umpirsky <[email protected]> wrote: > >> >> I'm so confused. >> >> I want to do simple thing, and I'm getting into same behaviour every time, >> all bootstrap run whatever module I'm in. >> >> My configuration: >> >> ... >> includePaths.library = APPLICATION_PATH "/../.." >> includePaths.library = APPLICATION_PATH "/../library" >> bootstrap.path = APPLICATION_PATH "/Bootstrap.php" >> bootstrap.class = "Bootstrap" >> autoloaderNamespaces[] = "Umpirsky" >> >> resources.modules[] = "admin" >> >> resources.frontController.moduleDirectory = APPLICATION_PATH "/modules" >> resources.frontController.controllerDirectory.default = APPLICATION_PATH >> "/modules/default/controllers" >> resources.frontController.controllerDirectory.admin = APPLICATION_PATH >> "/modules/admin/controllers" >> resources.frontController.plugins.init = "Umpirsky_Controller_Plugin_Init" >> resources.frontController.plugins.init = >> "Umpirsky_Controller_Plugin_Sidebar" >> resources.frontController.actionhelperpaths.Umpirsky_Controller_Helper = >> "Umpirsky/Controller/Helper" >> resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts" >> resources.layout.layout = "layout" >> ... >> >> I have 2 modules: >> >> - default >> - admin >> >> In application folder I have Bootstrap.php >> >> <?php >> class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { >> ... >> >> bootstrap resources for both modules >> >> In default module dir I have Bootstrap.php >> >> <?php >> class Default_Bootstrap extends Zend_Application_Module_Bootstrap { >> // Bootstrap what needed only for default module >> } >> >> In admin module dir I have Bootstrap.php >> >> <?php >> class Admin_Bootstrap extends Zend_Application_Module_Bootstrap { >> // Bootstrap what needed only for admin module >> } >> >> What should I do in order to get main bootstrap running always, and module >> bootstrap to run only when I'm in appropriate module? >> >> Regards, >> Sasa Stamenkovic. >> -- >> View this message in context: >> http://n4.nabble.com/A-question-about-bootstrapping-modules-tp659936p1311699.html >> Sent from the Zend Framework mailing list archive at Nabble.com. >> > >
