public function executeControllerAction($moduleName, $controllerName, $actionName, $params = array()) { $this->request->addParams($params); $controllerClass = Utils::toMixedCase($controllerName) . 'Controller'; $path = APPLICATION_PATH . "/modules/{$moduleName}/controllers/{$controllerClass}.php"; if (!file_exists($path)) { throw new Exception("Controller '{$controllerClass}' not found"); } include_once $path; $controller = new $controllerClass($this->request); $action = Utils::toCamelCase($actionName) . 'Action'; $controller->init($action); $result = $controller->{$action}(); return $result; }