src/Router.php
public static function performRoute($route) {
		$api_mode = isset($route["api-mode"]);
		Request::setRequestVariables($route["variables"], $api_mode);

		$controller = new $route["class"];
		$response = $controller->$route["method"]();

		if(!Request::isAjax() && !Request::isAPI() && isset($route["render-path"])) {
			Request::setRenderPath($route["render-path"]);
			try {
				$route = self::findRoute(explode('/', $route["render-path"]));
			} catch(ValidRouteNotFoundException $e) {
				throw new ValidRenderRouteNotFoundException($e);
			}
			$response = self::performRoute($route);
		}

		return $response;
	}
public static function performRoute($route) {
		$api_mode = isset($route["api-mode"]);
		Request::setRequestVariables($route["variables"], $api_mode);

		$controller = new $route["class"];
		$response = $controller->$route["method"]();

		if(!Request::isAjax() && !Request::isAPI() && isset($route["render-path"])) {
			Request::setRenderPath($route["render-path"]);
			try {
				$route = self::findRoute(explode('/', $route["render-path"]));
			} catch(ValidRouteNotFoundException $e) {
				throw new ValidRenderRouteNotFoundException($e);
			}
			$response = self::performRoute($route);
		}

		return $response;
	}
public static function performRoute ( $ route ) { $ api_mode = isset ( $ route [ "api-mode" ] ) ; Request :: setRequestVariables ( $ route [ "variables" ] , $ api_mode ) ; $ controller = new $ route [ "class" ] ; $ response = $ controller -> $ route [ "method" ] ( ) ; if ( ! Request :: isAjax ( ) && ! Request :: isAPI ( ) && isset ( $ route [ "render-path" ] ) ) { Request :: setRenderPath ( $ route [ "render-path" ] ) ; try { $ route = self :: findRoute ( explode ( '/' , $ route [ "render-path" ] ) ) ; } catch ( ValidRouteNotFoundException $ e ) { throw new ValidRenderRouteNotFoundException ( $ e ) ; } $ response = self :: performRoute ( $ route ) ; } return $ response ; }
Perform routing based upon the discovered route
@internal
@param  array $route Format: array(class, method, uri_variables)
@see Request::setRequestVariables()
@return mixed Return value of last route to be executed
Perform routing based upon the discovered route