public function forwardToRoute($routeName, $vars = null) { if ($route = DC::getRouter()->getRoute($routeName)) { DC::getRouter()->setCurrentRoute($route)->getCurrentRequest()->setUri($route->buildUri($vars)); $route = new ApplicationRoute($route); DC::getApplication()->setRoute($route); ControllerService::processControllerAction($route->getControllerName(), $route->getActionName()); } }
public function process() { if (ControllerService::isControllerExists('ApplicationController')) { ControllerService::getController('ApplicationController')->_preAction(); } ControllerService::processControllerAction($this->_route->getControllerName(), $this->_route->getActionName()); if (ControllerService::isControllerExists('ApplicationController')) { ControllerService::getController('ApplicationController')->_postAction(); } DC::getView()->render(); }
public static function notFoundAction() { echo "command not found\n\n"; ControllerService::processControllerAction('IndexController', 'defaultAction'); }