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');
 }
Ejemplo n.º 2
0
 public function toModuleAction($moduleName, $actionName)
 {
     header('Location: ' . $this->_getUrlToModule($moduleName) . '&' . $this->_conf->get('action_url_variable_name') . '=' . $this->_appMap->getModuleActionUrlName($moduleName, $actionName));
 }
Ejemplo n.º 3
0
 /**
  * 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);
 }