On Thursday 14 January 2010 13:37:02 Simon R Jones wrote:
>to partially answer my own question "resources.modules[] =" did work,
>not sure what I was doing.
>
>However, it appears only to work if I have a custom module Bootstrap,
>is that expected behaviour since its not clear in the docs? Unless I'm
>not reading it properly

Oops... meant to send the following in the last mail. 

The module autoloaders inject themselves in the to the autoloader stack on 
instantiation so the following will add one with default resource 
configuration for each module.

    protected function _initModuleLoaders()
    {
        $this->bootstrap('frontcontroller');
        $front = $this->getResource('frontcontroller');
        $modules = array_keys($front->getControllerDirectory());

        foreach($modules as $moduleName) {
            $basePath = APPLICATION_PATH . '/modules/' . $moduleName;
            $resourceLoader = new Zend_Application_Module_Autoloader(array(
                'basePath'  => $basePath,
                'namespace' => ucfirst($moduleName),
            ));
        }
    }

Reply via email to