Code: Select all
<?php
chdir('core/libraries');
session_start();
session_regenerate_id();
spl_autoload_register('mypro_autoload');
Zend_Registry::set('config', $config);
$front = Zend_Controller_Front::getInstance();
$front->registerPlugin(new MyPro_Controller_Plugin_CheckAuth());
$front->registerPlugin(new MyPro_Controller_Plugin_NoCache());
$front->setParam('noViewRenderer', true);
//$front->setParam('noErrorHandler', true);
//$front->setParam('useDefaultControllerAlways', true);
//$front->setDefaultControllerName('Index');
$front->setDefaultAction('index');
$front->setDefaultModule('domain');
$front->setModuleControllerDirectoryName('controllers');
$front->addModuleDirectory('../../module/system');
$front->addModuleDirectory('../../module/plugin');
$front->dispatch();Code: Select all
admin/
index.php
module/
plugin/
shipping/
controllers/
IndexController.php
system/
domain/
controllers/
IndexController.php
Code: Select all
admin/
admin/domain
admin/domain/index
// These fail!!!
admin/shipping
The domain module controller is properly routed but every other module is not being dispatched to instead I get a exception of the form:
Without re-writing a custom router, how do I get routes to dispatch to the proper modules in the directory structure provided above. I stopped testing once I got the domain module to start responding and now this, I'm totally lost with Zend.Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (error)' in C:\wamp\www\admin\core\libraries\Zend\Controller\Dispatcher\Standard.php:242 Stack trace: #0 C:\wamp\www\admin\core\libraries\Zend\Controller\Front.php(946): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #1 C:\wamp\www\admin\core\bootstrap.php(28): Zend_Controller_Front->dispatch() #2 C:\wamp\www\admin\index.php(11): include('C:\wamp\www\adm...') #3 {main} thrown in C:\wamp\www\admin\core\libraries\Zend\Controller\Dispatcher\Standard.php on line 242
Cheers,
Alex