private function _getProperModule() { $key = $this->_conf->get('module_url_variable_name'); $moduleUrlName = $this->_get->{$key}; $moduleName = $this->_appMap->getModuleNameFromUrlName($moduleUrlName); if (!is_null($moduleName)) { return new $moduleName($this->_get, $this->_post, $this->_conf, $this->_view, $this->_appMap); } throw new ControllerException('No module has been choosen for execution'); }
public function toModuleAction($moduleName, $actionName) { header('Location: ' . $this->_getUrlToModule($moduleName) . '&' . $this->_conf->get('action_url_variable_name') . '=' . $this->_appMap->getModuleActionUrlName($moduleName, $actionName)); }
/** * return an appropriate action * * @param string $actionName - action name * @return ModuleAction */ protected function _getAction($actionName) { $actionClassName = $this->_appMap->getModuleActionFromActionUrlName($this->_moduleData['module_name'], $actionName); return new $actionClassName($this->_get, $this->_post, $this->_conf, $this->_view, $this->_appMap, $this->_session); }