« Return to Thread: Bootstrapping modules with Zend_Application

Re: AW: Bootstrapping modules with Zend_Application

by meloniasty :: Rate this Message:

Reply to Author | View in Thread


Matthew Weier O'Phinney-3 wrote:
-- meloniasty <dawid.melewski@gmail.com> wrote
(on Saturday, 25 April 2009, 05:02 AM -0700):
> why in Zend_Application_Resource_Modules all modules are initialized? i
> think it should only initialize only current module, when i run cms module
> its should bootsraping only Cms_Bootstrap and load settings from cms, am i
> right?

There were two considerations in play when we chose to initialize
modules at application bootstrapping time:

 * Many people write module-specific routing. The appropriate place to
   define this is at the module level -- which means the module
   bootstrap must be run at application startup.

 * Many people will utilize resources from other modules -- for
   instance, to provide widgets to their layouts. For this to work,
   autoloading for each module must be setup.

Please be aware, however, that you do not need to use the Modules
resource if it does not fit your needs -- you can always write your own
resource for bootstrapping modules on-demand instead. The resource
provided is intended to fit the 80/20 use case.

--
Matthew Weier O'Phinney
Project Lead            | matthew@zend.com
Zend Framework          | http://framework.zend.com/
could you give some examples how to build applications with config in ini file where are settings for different layouts for each modules (2 or 3 modules)?

 « Return to Thread: Bootstrapping modules with Zend_Application