public function findByRequest(ServerRequestInterface $request)
    {
        $result = $this->findRouteByRequest($request, trim($request->getUri()->getPath(), '/'));

        if(!$result['route'])
            throw new RouteNotFoundException('Route for request '.$request->getMethod().' '.$request->getUri()->getPath().' does not exist');

        return $this->factory->createFinding($result['route'], $result['parameter'], $request);
    }
public function findByRequest(ServerRequestInterface $request)
    {
        $result = $this->findRouteByRequest($request, trim($request->getUri()->getPath(), '/'));

        if(!$result['route'])
            throw new RouteNotFoundException('Route for request '.$request->getMethod().' '.$request->getUri()->getPath().' does not exist');

        return $this->factory->createFinding($result['route'], $result['parameter'], $request);
    }
public function findByRequest ( ServerRequestInterface $ request ) { $ result = $ this -> findRouteByRequest ( $ request , trim ( $ request -> getUri ( ) -> getPath ( ) , '/' ) ) ; if ( ! $ result [ 'route' ] ) throw new RouteNotFoundException ( 'Route for request ' . $ request -> getMethod ( ) . ' ' . $ request -> getUri ( ) -> getPath ( ) . ' does not exist' ) ; return $ this -> factory -> createFinding ( $ result [ 'route' ] , $ result [ 'parameter' ] , $ request ) ; }
Make a finding by \Exedra\Http\Request
@param ServerRequestInterface $request
@return Finding
@throws RouteNotFoundException
Make a finding by \ Exedra \ Http \ Request