php - How to run a controller from a helper. Zend Framework 1.12 -
i understand isn't true way! tell me, how can run other module->controller action helper? or give me other way!
i have api module, , need run api module helper prepared request params. have thoughts this?
into action_helper try apply code:
require_once "../../modules/somemodule/controllers/somecontroller.php"; $ctrl = new somemodule_somecontroller($request, $response); $ctrl->run();
but error:
fatal error: require_once(): failed opening required '../../modules/somemodule/controllers/somecontroller.php' (include_path='..') in /path/to/helper/action
solution
if ask question on another
how run controller controller?
we've got answer =)
action helper
$that = $this->getactioncontroller(); $that->forward("someaction", "somecontroller", "somemodule", $params);
if ask question on another
how run controller controller?
we've got answer =)
action helper
$that = $this->getactioncontroller(); $that->forward("someaction", "somecontroller", "somemodule", $params);
Comments
Post a Comment