I want make a in my CMS autoload plugin, which will be automaticly load externall controller to my admin module.
I writing because I have problem with add external controller to my Zend module. My situation is: I have Admin module and external catalog: ROOT_PATH |-modules |-ModProducts |-controller |-forms |-models |-DbTable |-views
Zend give me instruction addControllerDirectory but When use this instruction:
$frontController = Zend_Controller_Front::getInstance();
$frontController->addControllerDirectory(
ROOT_PATH . '/modules/mod_products/controllers','admin'
);
$frontController->addControllerDirectory(
APPLICATION_PATH . '/modules/admin/controllers','admin'
);
Module Products not working. I get error: " Invalid controller specified (Module-Products)"
When i change line in the code: $frontController = Zend_Controller_Front::getInstance();
$frontController->addControllerDirectory(
APPLICATION_PATH . '/modules/admin/controllers','admin'
);
$frontController->addControllerDirectory(
ROOT_PATH . '/modules/mod_products/controllers','admin'
);
My Admin module is not working and I get this same errror.
I know how load resources (forms, models etc.) but i don't know how load external controller.
Please helpe me.