I am new to Zend Modular Application . I have an api controller and I want to call other modules from this controller. For example post the data to this address:
http://localhost/api/addTask
I added a custom route to redirect all of requests to api/index
For now, How can I call a module or another method by the indexAction?
for example:
function indexAction()
{
$params = $this->getRequets()->getParams();
$controller = $params[0];//I know that there is issues with this line but keep going...
//module name is addTask
//call to module or controller addTask
}
Thanks in Advance
You can use
_forward()to call other actions from a controller_forward($action, $controller = null, $module = null, array $params = null):Here is the link to ZF manual Zend Action Helpers