public function runAs($routeName, $params = [])
    {
        if (!isset($this->routings[$routeName])) {
            throw new \Exception("Route name '{$routeName}' not found!");
        }

        // populate handler queue
        $handler = end($this->routings[$routeName]);
        $this->appendHandlerQueue($handler);

        // Run everything in handler queue
        $output = null;
        while ($handler = array_shift($this->handlerQueue)) {
            $output = $this->executeHandler($handler, $params, $output);
        }
        echo $this->get('view');

        return $output;
    }
public function runAs($routeName, $params = [])
    {
        if (!isset($this->routings[$routeName])) {
            throw new \Exception("Route name '{$routeName}' not found!");
        }

        // populate handler queue
        $handler = end($this->routings[$routeName]);
        $this->appendHandlerQueue($handler);

        // Run everything in handler queue
        $output = null;
        while ($handler = array_shift($this->handlerQueue)) {
            $output = $this->executeHandler($handler, $params, $output);
        }
        echo $this->get('view');

        return $output;
    }
public function runAs ( $ routeName , $ params = [ ] ) { if ( ! isset ( $ this -> routings [ $ routeName ] ) ) { throw new \ Exception ( "Route name '{$routeName}' not found!" ) ; } // populate handler queue $ handler = end ( $ this -> routings [ $ routeName ] ) ; $ this -> appendHandlerQueue ( $ handler ) ; // Run everything in handler queue $ output = null ; while ( $ handler = array_shift ( $ this -> handlerQueue ) ) { $ output = $ this -> executeHandler ( $ handler , $ params , $ output ) ; } echo $ this -> get ( 'view' ) ; return $ output ; }
Handle current request using specificed route handler
Handle current request using specificed route handler