A few things.
Firstly, the "default" module doesn't belong under the modules directory. The default module is the application itself and lives directly under application/
Add
to appliction.ini to initialize the module resource plugin and set the modules directory.Code:resources.modules = "" resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
Create modules/admin/Bootstrap.php and fill it with
[php]
<?php
class Auth_Bootstrap extends Zend_Application_Module_Bootstrap
{
}
[/php]
to bootstrap the module, including setting up resource autoloaders for models, forms, services etc.
Add this function
[php]
protected function _initAutoload()
{
new Zend_Application_Module_Autoloader(array(
'basePath' => APPLICATION_PATH,
'namespace' => 'Default',
));
}
[/php]
to your application/Bootstrap.php to initialize the resource autoloaders for the default module. "Default" can be changed to whatever you are prefixing your resources (models, forms, services etc) of your default module with - often the application name.
I've also blogged about turning the Guestbook application from the Quickstart guide into a module, there might be some more information there: Brenton Alker’s Deprecated Behaviour Building a Modular Application in Zend Framework – Part 2


LinkBack URL
About LinkBacks



Reply With Quote