|
|||
|
I have a working code in non-module structure.
-application - controllers - IndexController.php - AuthController.php - views - ... I try to separate into module sturcture - application - modules - default - controllers - IndexController.php - AuthController.php - admin - controllers - .... so I update the code $frontController->setControllerDirectory('./application/controllers') to $frontController->setControllerDirectory(array('default' => realpath('./application/modeles/controllers/default'), 'admin' => realpath('./application/modeles/controllers/admin') )) but I got the following error message Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (auth)' in D:\www\dev-zend\dev\library\Zend\Controller\Dispatcher\Standa rd.php:194 Stack trace: #0 D:\www\dev-zend\dev\library\Zend\Controller\Front.php(920): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #1 D:\www\dev-zend\dev\index.php(54): Zend_Controller_Front->dispatch() #2 {main} thrown in D:\www\dev-zend\dev\library\Zend\Controller\Dispatcher\Standa rd.php on line 194 I thought I dont have to add Namespace in default, correct, what else did I miss ? please advice. Thanks |
|
|||
|
You'll have to change the name of your controllers. If you have a module called "users", the name of your origin AuthController will be "Users_AuthController"... so you have to prepend the module name followed by an underscore (except for your "default" module!)
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|