2009年4月16日星期四

[fw-core] Bootstrapping modules with Zend_Application

Hi everybody,

I'm currently developing the core structure for a new module-based Zend
Framework MVC application. In general Zend_Application provides provisions
for simple module bootstrapping with its Zend_Application_Resource_Modules
and Zend_Application_Module_Bootstrap.
But as Zend_Application_Resource_Modules bootstraps all available modules on
the application bootstrap I coded my own front-controller-plugin to do a
module bootstrapping on preDispatch(). The module bootstraps are all
subclassed Zend_Application_Module_Bootstrap classes (I think that's what
this class is supposed to do).
To cut a long story short:
Why do I have to implement
Zend_Application_Bootstrap_Bootstrapper::run() in my module bootstrap
classes? I think this is somehow needless as
Zend_Application_Resource_Modules (on which I based my bootstrapping plugin)
only calls Zend_Application_Bootstrap_Bootstrapper::bootstrap(). A
run()-call wouldn't make much sense. Perhaps it's possible to implement
Zend_Application_Module_Bootstrap::run() as an empty method to allow for
more simple modules bootstraps. Just a thought...

Best regards

Stefan

没有评论: