public function routeController(Route $action) { $controller = "\\Luba\\Controllers\\{$action->controller()}"; $controller = new $controller(); $method = $action->method() == '' ? 'index' : $action->method(); if (method_exists($controller, $method) or $controller->isGlobal()) { if ($controller->actionIsAllowed($method)) { return call_user_func_array([$controller, $method], $action->params()); } } else { throw new ControllerActionNotFoundException($method, $controller); } }