public function handle(RequestInterface $request)
    {
        $handler = new RoutingHandler($this->container);

        if (! $this->has(Application::MIDDLEWARE))
        {
            return $handler->handle($request);
        }

        $dispatcher = $this->get(Application::MIDDLEWARE);

        return $dispatcher->process($request, $handler);
    }
public function handle(RequestInterface $request)
    {
        $handler = new RoutingHandler($this->container);

        if (! $this->has(Application::MIDDLEWARE))
        {
            return $handler->handle($request);
        }

        $dispatcher = $this->get(Application::MIDDLEWARE);

        return $dispatcher->process($request, $handler);
    }
public function handle ( RequestInterface $ request ) { $ handler = new RoutingHandler ( $ this -> container ) ; if ( ! $ this -> has ( Application :: MIDDLEWARE ) ) { return $ handler -> handle ( $ request ) ; } $ dispatcher = $ this -> get ( Application :: MIDDLEWARE ) ; return $ dispatcher -> process ( $ request , $ handler ) ; }
Dispatches the request and returns into a response.

@param  \Zapheus\Http\Message\RequestInterface $request
@return \Zapheus\Http\Message\ResponseInterface
Dispatches the request and returns into a response .