Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-07-2007, 05:10 PM
Junior Member
 
Join Date: Dec 2007
Posts: 4
Default modules question

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 12-08-2007, 12:30 PM
Junior Member
 
Join Date: Nov 2007
Location: Elmshorn, Germany
Posts: 14
Send a message via ICQ to t-mow
Default

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!)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 08:30 PM.