|
Re: Question about setControllerDirectory: msg#00127php.zend.framework.mvc
Hello Matthew,
Yes, I forgot to say that I resolved this issue and fully understand now the modules. After doing some reading and practicing along with API Docs I learned quite a lot of things. Although there is still a lot more to learn but I'll leave it to read/practice/test. Right now, since I didn't want my module to be named "default" *which is what ZF names its module as default* I ended up doing this $frontier = new Zend_Controller_Front::getInstance(); $frontier->setControllerDirectory(array( 'MyModule' => 'path', 'MySecondModule' => 'path')); If you use only a path (without array) it will automatically become "default", but if you put multiple modules and one of them isn't named "default" it will throw you the message. So to set the default module you will simply use: $frontier->setDefaultModule('MyModule'); As for routes working together with modules: $prettyme = new Zend_Controller_Router_Route( 'my/pretty/urls', array( 'controller' => 'clean', 'action' => 'urls', 'module' => 'MyModule' ) ); $router->addRoute('pretty-route',$prettyme); Well, this is more of an example and basic explanation, there is probably more to it, or maybe not but I'll leave it at that for the moment. I hope this helps anyone that is having trouble with modules or routing with modules. Thanks again Matthew! Regards, David On Tue, Jul 22, 2008 at 8:53 AM, Matthew Weier O'Phinney <matthew-C1q0ot2/XZ0@xxxxxxxxxxxxxxxx> wrote:
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Best practices in a thin-controller application: 00127, Adam Jensen |
|---|---|
| Next by Date: | Re: Best practices in a thin-controller application: 00127, Bryce Lohr |
| Previous by Thread: | Re: Question about setControllerDirectoryi: 00127, Matthew Weier O'Phinney |
| Next by Thread: | Re: Question about setControllerDirectory: 00127, Matthew Weier O'Phinney |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |