Application.php
private function execute()
	{
		if ($this->currentRoute == null) {
			$this->router->getRoute('error_page')->setAction('_notFound');
			$this->toRoute('error_page');
			return;
		}
		$controllerName = $this->currentRoute->getController();
		if ($controllerName == '') {
			if ($this->currentRoute->getParams() != null && array_key_exists('controller', $this->currentRoute->getParams()))
				$controllerName = $this->currentRoute->getParams()['controller'];
			elseif ($this->currentRoute->getDefault() != null)
				$controllerName = $this->currentRoute->getDefault()->getController();
			else {
				throw new \Exception($this->translator->translate("The requested url has a bad route configuration!"));
			}
		}

		if (array_key_exists($controllerName, $this->invokable))
			$controllerName = $this->invokable[$controllerName];
		elseif (strpos($controllerName, 'decoy\base') === false)
			throw new \Exception('The requested Controller: \'' . $controllerName . '\' is not registered!');
		$c = new $controllerName($this);
		if ($c->getResult() && !in_array($c->identifier, $this->disableRender) && $this->enableRender) {
			echo $this->response->output($c);
		}
	}
private function execute()
	{
		if ($this->currentRoute == null) {
			$this->router->getRoute('error_page')->setAction('_notFound');
			$this->toRoute('error_page');
			return;
		}
		$controllerName = $this->currentRoute->getController();
		if ($controllerName == '') {
			if ($this->currentRoute->getParams() != null && array_key_exists('controller', $this->currentRoute->getParams()))
				$controllerName = $this->currentRoute->getParams()['controller'];
			elseif ($this->currentRoute->getDefault() != null)
				$controllerName = $this->currentRoute->getDefault()->getController();
			else {
				throw new \Exception($this->translator->translate("The requested url has a bad route configuration!"));
			}
		}

		if (array_key_exists($controllerName, $this->invokable))
			$controllerName = $this->invokable[$controllerName];
		elseif (strpos($controllerName, 'decoy\base') === false)
			throw new \Exception('The requested Controller: \'' . $controllerName . '\' is not registered!');
		$c = new $controllerName($this);
		if ($c->getResult() && !in_array($c->identifier, $this->disableRender) && $this->enableRender) {
			echo $this->response->output($c);
		}
	}
private function execute ( ) { if ( $ this -> currentRoute == null ) { $ this -> router -> getRoute ( 'error_page' ) -> setAction ( '_notFound' ) ; $ this -> toRoute ( 'error_page' ) ; return ; } $ controllerName = $ this -> currentRoute -> getController ( ) ; if ( $ controllerName == '' ) { if ( $ this -> currentRoute -> getParams ( ) != null && array_key_exists ( 'controller' , $ this -> currentRoute -> getParams ( ) ) ) $ controllerName = $ this -> currentRoute -> getParams ( ) [ 'controller' ] ; elseif ( $ this -> currentRoute -> getDefault ( ) != null ) $ controllerName = $ this -> currentRoute -> getDefault ( ) -> getController ( ) ; else { throw new \ Exception ( $ this -> translator -> translate ( "The requested url has a bad route configuration!" ) ) ; } } if ( array_key_exists ( $ controllerName , $ this -> invokable ) ) $ controllerName = $ this -> invokable [ $ controllerName ] ; elseif ( strpos ( $ controllerName , 'decoy\base' ) === false ) throw new \ Exception ( 'The requested Controller: \'' . $ controllerName . '\' is not registered!' ) ; $ c = new $ controllerName ( $ this ) ; if ( $ c -> getResult ( ) && ! in_array ( $ c -> identifier , $ this -> disableRender ) && $ this -> enableRender ) { echo $ this -> response -> output ( $ c ) ; } }
Executing the current route
Executing the current route