/** * */ public function determineController() { try { $controller = $this->router->getController(); } catch (RouteNotFound $e) { $controller = "framework.errorController"; $this->controllerError = IControllerError::PAGE_NOT_FOUND; } catch (WrongMethod $e) { $controller = "framework.errorController"; $this->controllerError = IControllerError::METHOD_NOT_ALLOWED; $this->kernel->getResponse()->addValue("error", $e->getMessage()); } $this->controller = $this->injector->injectClass($controller); }