Your configuration is correct, but you need to have a module bootstrap also. Even if it's just an empty class extending Zend_Application_Module_Bootstrap stored at modulename/Bootstrap.php, e.g.
class Admin_Bootstrap extends Zend_Application_Module_Bootstrap {}
The directory structure you picked also look fine. People use different setups of course, but so long as the modules are in whatever directory you picked as the module directory, it works fine.
Pádraic Brady
http://blog.astrumfutura.com
http://www.survivethedeepend.com
OpenID Europe Foundation Irish Representative
From: huajun qi <qihjun@gmail.com>
To: fw-mvc@lists.zend.com
Sent: Monday, September 21, 2009 10:12:42 AM
Subject: [fw-mvc] a project with multimodules
--
Location:
class Admin_Bootstrap extends Zend_Application_Module_Bootstrap {}
The directory structure you picked also look fine. People use different setups of course, but so long as the modules are in whatever directory you picked as the module directory, it works fine.
http://blog.astrumfutura.com
http://www.survivethedeepend.com
OpenID Europe Foundation Irish Representative
From: huajun qi <qihjun@gmail.com>
To: fw-mvc@lists.zend.com
Sent: Monday, September 21, 2009 10:12:42 AM
Subject: [fw-mvc] a project with multimodules
I want to bulid a project with more than one module, I have found some way to do it, but still can not make it!
I can't find a good tutorial to address how to make it, and I have finished reading the reference guide, I still can not make a module work!
One tutorial tells to add
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.modules[]
to application's configuration file, another tutorial tells to use
$front->addModuleDirectory();
method to do this, I tried both, but neither worked!
I know these two ways both should work, so did I miss something?
And if you use modules, what is the preferred directory structure?
application:
controllers
views
modules
user
controllers
views
admin
controllers
views
OR
application:
default
controllers
views
user
controllers
views
admin
controllers
views
And how to setup according to different directory structure?
Location:
没有评论:
发表评论