public function callController($route, array $arguments = array())
    {
        $route = $this->set($route, $arguments);
        $callback = Handler::get($route, null, 'controller');

        if (!$callback[0] instanceof Controller) {
            throw new LogicException('Controller must be instance of \gplcart\core\Controller');
        }

        call_user_func_array($callback, $route['arguments']);

        // We should never get here as the page callback must abort the script execution
        throw new LogicException('An error occurred while processing the route');
    }
public function callController($route, array $arguments = array())
    {
        $route = $this->set($route, $arguments);
        $callback = Handler::get($route, null, 'controller');

        if (!$callback[0] instanceof Controller) {
            throw new LogicException('Controller must be instance of \gplcart\core\Controller');
        }

        call_user_func_array($callback, $route['arguments']);

        // We should never get here as the page callback must abort the script execution
        throw new LogicException('An error occurred while processing the route');
    }
public function callController ( $ route , array $ arguments = array ( ) ) { $ route = $ this -> set ( $ route , $ arguments ) ; $ callback = Handler :: get ( $ route , null , 'controller' ) ; if ( ! $ callback [ 0 ] instanceof Controller ) { throw new LogicException ( 'Controller must be instance of \gplcart\core\Controller' ) ; } call_user_func_array ( $ callback , $ route [ 'arguments' ] ) ; // We should never get here as the page callback must abort the script execution throw new LogicException ( 'An error occurred while processing the route' ) ; }
Call a controller for the route
@param string|array $route
@param array $arguments
@throws LogicException
Call a controller for the route