|
Re: Question about setControllerDirectory: msg#00099php.zend.framework.mvc
I think you must special one of two module's name is 'default' or use 'setDefaultModule' method to set ImageHost is default module :-) David G. wrote: > > Well, I wanted to separate the administration controllers from the main > site logical code. This is my first time doing it and thought I would give > it a try for the sake of not overcomplicating my life. > > Here's the code > > <?php > /** > * CMS Skeleton > * > * #@author: David Gonzalez > */ > > error_reporting(E_ALL|E_STRICT); > > ini_set('display_startup_errors', 1); > ini_set('display_errors',1); > > set_include_path('./library' . PATH_SEPARATOR . get_include_path()); > > require_once 'Zend/Loader.php'; > > Zend_Loader::registerAutoload(); > > > $frontier = Zend_Controller_Front::getInstance(); > $frontier->throwExceptions(1); > > $frontier->setControllerDirectory( > array('ImageHost' => 'application/CMS/controllers', > 'ImageHostAdmin' => 'application/CMSAdmin/controllers') > ); > > var_dump($frontier->getModuleControllerDirectoryName()); > > $frontier->dispatch(); > > ?> > > > Can someone explain why ZF is throwing this message at me? > > Fatal error: Uncaught exception 'Zend_Controller_Exception' with message > 'No default module defined for this application' in > C:\WebServer\Apache2\htdocs\CMS\library\Zend\Controller\Dispatcher\Standard.php:392 > Stack trace: #0 > C:\WebServer\Apache2\htdocs\CMS\library\Zend\Controller\Dispatcher\Standard.php(211): > Zend_Controller_Dispatcher_Standard->getControllerClass(Object(Zend_Controller_Request_Http)) > #1 > C:\WebServer\Apache2\htdocs\CMS\library\Zend\Controller\Dispatcher\Standard.php(245): > Zend_Controller_Dispatcher_Standard->isDispatchable(Object(Zend_Controller_Request_Http)) > #2 C:\WebServer\Apache2\htdocs\CMS\library\Zend\Controller\Front.php(914): > Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), > Object(Zend_Controller_Response_Http)) #3 > C:\WebServer\Apache2\htdocs\CMS\index.php(29): > Zend_Controller_Front->dispatch() #4 {main} thrown in > C:\WebServer\Apache2\htdocs\CMS\library\Zend\Controller\Dispatcher\Standard.php > on line 392 > > I checked the API Doc and the documentation but I didn't quite find a real > answer to this, hope someone could explain this to me, I'd really > appreciate it. I want to continue learning ZF. > > Thanks, > David > -- View this message in context: http://www.nabble.com/Question-about-setControllerDirectory-tp18538214p18539133.html Sent from the Zend MVC mailing list archive at Nabble.com. |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Best practices in a thin-controller application: 00099, Adam Jensen |
|---|---|
| Next by Date: | Re: Question about setControllerDirectory: 00099, David G. |
| Previous by Thread: | Question about setControllerDirectoryi: 00099, David G. |
| Next by Thread: | Re: Question about setControllerDirectory: 00099, David G. |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |