private function runAction()
    {
        // Get URL
        $url = $this->request->url();

        // Get route action
        $action = $this->router->getAction($url);

        // Perform the filter
        if ($action['filter']) {
            $filter = $this->router->performFilter($action['filter']);
        }

        // Check if the controller exists
        if (!isset($action) || !is_string($action['class']) || !class_exists($action['class'])) {
            throw new \Exception('Controller not found', 404);
        }

        // Create the required controller
        $controller = $this->make($action['class']);

        // Execute the required method and return the response
        return $this->response->output(call_user_func_array([$controller, $action['method']], $action['params']? : []));
    }
private function runAction()
    {
        // Get URL
        $url = $this->request->url();

        // Get route action
        $action = $this->router->getAction($url);

        // Perform the filter
        if ($action['filter']) {
            $filter = $this->router->performFilter($action['filter']);
        }

        // Check if the controller exists
        if (!isset($action) || !is_string($action['class']) || !class_exists($action['class'])) {
            throw new \Exception('Controller not found', 404);
        }

        // Create the required controller
        $controller = $this->make($action['class']);

        // Execute the required method and return the response
        return $this->response->output(call_user_func_array([$controller, $action['method']], $action['params']? : []));
    }
private function runAction ( ) { // Get URL $ url = $ this -> request -> url ( ) ; // Get route action $ action = $ this -> router -> getAction ( $ url ) ; // Perform the filter if ( $ action [ 'filter' ] ) { $ filter = $ this -> router -> performFilter ( $ action [ 'filter' ] ) ; } // Check if the controller exists if ( ! isset ( $ action ) || ! is_string ( $ action [ 'class' ] ) || ! class_exists ( $ action [ 'class' ] ) ) { throw new \ Exception ( 'Controller not found' , 404 ) ; } // Create the required controller $ controller = $ this -> make ( $ action [ 'class' ] ) ; // Execute the required method and return the response return $ this -> response -> output ( call_user_func_array ( [ $ controller , $ action [ 'method' ] ] , $ action [ 'params' ] ? : [ ] ) ) ; }
Setups a database connection for models

@return void
Setups a database connection for models