Hi Vincent - See response to your questions below. This is what I understand from the modular structure.
________________________________ From: Vadim Gabriel [mailto:vadim...@gmail.com] Sent: 07 May 2009 11:00 AM To: Mon Zafra Cc: Zend Framework - General Subject: Re: [fw-general] Modules using zend_application Hey, "About the workshop controller problem, that's probably a rewrite issue or a wrong base url setting. " Reading that i was like "yea right..." but then i noticed that i emptied the baseUrl property in the config.php file and therefore it throw that exception. Removing that just worked. And modules are working now. Thanks for that. BTW I do not use the Zend_Tool. But i am glad i got this working. @Karl Thanks for the code snippet. Could you let me know what it used for? If i add it to the Admin module it's being called. Several questions: K >>No idea what you mean. This was a test to get a 'stats' module bootstrap called. 1. Why isn't the default module ('default') bootsrap class called? And the admin module bootstrap file is? >> From what I've managed to figure out, the default module uses your application Bootstrap 2. Why do i need to have 3 bootstrap classes when i only have two modules? >> You'll only need 2. >> one under application/Bootstrap.php instead of having it under /application/modules/default/Bootstrap.php >> and one for your admin module under /application/modules/admin/Bootstrap.php 3. couldn't i use the the contents of application/Bootstrap.php inside application/modules/admin/Bootstrap.php and application/modules/default/Bootstrap.php ? I mean having a bootstrap class for each module? >> The application one will be used for the default module, so you shouldn't have another one under /default Thanks again. On Thu, May 7, 2009 at 11:30 AM, Mon Zafra <mon...@gmail.com> wrote: The module bootstraps will not be executed unless the Modules bootstrap resource plugin is enabled. Since (I guess) you're using Zend_Tool now, just add the line 'resources.modules = 1' in application.ini. If you aren't using a config, there are a couple of ways (that I know of) to enable it: 1. Via options passed to the Zend_Application constructor: // project/public/index.php $app = new Zend_Application($env, array( 'resources' => array( 'modules' => array(), // other resource plugins )); 2. Via the $_pluginResources property of the application bootstrap: // project/application/Bootstrap.php class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { protected $_pluginResources = array( 'modules' => array() ); } About the workshop controller problem, that's probably a rewrite issue or a wrong base url setting. -- Mon On Thu, May 7, 2009 at 3:59 PM, Vadim Gabriel <vadim...@gmail.com> wrote: I was struggling with this, This entire morning with no luck at trying to figure out how to setup a moduler structure and using zend_application and bootstrapping. I have gone to a point where he scans the modules directory, Does not load the bootstrap files located under each module directory root and has the {modulename}_Bootstrap class name, It then tries to load the controller named 'workshop' under the url http://localhost/workshop/public which is clearly something it shouldn't do. And it does that until i add 'useDefaultControllerAlways' to the config file under the FrontController resource. This is becoming very hard to understand as time goes by and the ZF project grows bigger. I couldn't find any (good understanable organized) documentation regarding this approach. If anyone tried anything like this or has something to share, Please do. It's getting very agneying task to try and create an application (with modules) using ZF b/c of the lack of documentation for these issues. Thanks. -- Vincent Gabriel. Lead Developer, Senior Support. Zend Certified Engineer. Zend Framework Certified Engineer. -- http://www.vadimg.co.il/ -- Vincent Gabriel. Lead Developer, Senior Support. Zend Certified Engineer. Zend Framework Certified Engineer. -- http://www.vadimg.co.il/