public function getEndpointForRequest(RequestInterface $request): EndpointInterface
    {
        $requestClass = get_class($request);
        if (!isset($this->endpointsByRequestClass[$requestClass])) {
            throw new UnsupportedRequestException($requestClass);
        }

        return $this->endpointsByRequestClass[$requestClass];
    }
public function getEndpointForRequest(RequestInterface $request): EndpointInterface
    {
        $requestClass = get_class($request);
        if (!isset($this->endpointsByRequestClass[$requestClass])) {
            throw new UnsupportedRequestException($requestClass);
        }

        return $this->endpointsByRequestClass[$requestClass];
    }
public function getEndpointForRequest ( RequestInterface $ request ) : EndpointInterface { $ requestClass = get_class ( $ request ) ; if ( ! isset ( $ this -> endpointsByRequestClass [ $ requestClass ] ) ) { throw new UnsupportedRequestException ( $ requestClass ) ; } return $ this -> endpointsByRequestClass [ $ requestClass ] ; }
Returns the endpoint for the request.
@param RequestInterface $request
@return EndpointInterface
@throws UnsupportedRequestException
Returns the endpoint for the request .