public function requestRoute(Request $request): ? Route
    {
        $requestMethod = $request->getMethod();
        // Decode the request uri
        $requestUri = rawurldecode($request->getPathOnly());

        return $this->matchRoute($requestUri, $requestMethod);
    }
public function requestRoute(Request $request): ? Route
    {
        $requestMethod = $request->getMethod();
        // Decode the request uri
        $requestUri = rawurldecode($request->getPathOnly());

        return $this->matchRoute($requestUri, $requestMethod);
    }
public function requestRoute ( Request $ request ) : ? Route { $ requestMethod = $ request -> getMethod ( ) ; // Decode the request uri $ requestUri = rawurldecode ( $ request -> getPathOnly ( ) ) ; return $ this -> matchRoute ( $ requestUri , $ requestMethod ) ; }
Get a route from a request.

@param Request $request The request

@throws \InvalidArgumentException

@return null|Route
The route if found or null when no static route is
found for the path and method combination specified
Get a route from a request .