views:

88

answers:

4

Hi, I'm using Zend Framework 1.10.7 and I'm looking for a way to use a per module bootstrap to set up specific module configuration.

I thought it was as simple as extending the Zend_Appplication_Bootstrap_Bootstrap and put it at the root of the module directory, but it doesn't seem.

Thank you.

+1  A: 

Zend_Application_Module_Bootstrap is the class you want to extend. So say you had a module called 'Blog', you'd create a bootstrap class like this:

class Blog_Bootstrap extends Zend_Application_Module_Bootstrap
{
    // module specific bootstrap methods here
}

and put it at application/modules/blog/Bootstrap.php.

Tim Fountain
A: 

Please notice that every bootstrap will be runned, even you you load a controller of a specific module.

Ronn0
A: 

I'm new to Zend Framework.currently I'm using " create modular application with zend" tutorial by Jeroen Keppens to add modularity to my application.But to load modular layouts I'm trying to follow Matthew Weier O'Phinney's Module Bootstraps in Zend Framework: Do's and Don'ts