public function matchesRequest(RequestInterface $request): bool
    {
        $uri = $request->getUri();
        // domain
        if (!$this->matchesDomain($uri->getHost())) {
            return false;
        }

        // path
        if (!$this->matchesPath($uri->getPath())) {
            return false;
        }

        // secure
        if ($this->hasAttribute(static::ATTR_SECURE) && 'https' !== $uri->getScheme()) {
            return false;
        }

        return true;
    }
public function matchesRequest(RequestInterface $request): bool
    {
        $uri = $request->getUri();
        // domain
        if (!$this->matchesDomain($uri->getHost())) {
            return false;
        }

        // path
        if (!$this->matchesPath($uri->getPath())) {
            return false;
        }

        // secure
        if ($this->hasAttribute(static::ATTR_SECURE) && 'https' !== $uri->getScheme()) {
            return false;
        }

        return true;
    }
public function matchesRequest ( RequestInterface $ request ) : bool { $ uri = $ request -> getUri ( ) ; // domain if ( ! $ this -> matchesDomain ( $ uri -> getHost ( ) ) ) { return false ; } // path if ( ! $ this -> matchesPath ( $ uri -> getPath ( ) ) ) { return false ; } // secure if ( $ this -> hasAttribute ( static :: ATTR_SECURE ) && 'https' !== $ uri -> getScheme ( ) ) { return false ; } return true ; }
Returns true if the current cookie matches the supplied request.

@param RequestInterface $request A request object
Returns true if the current cookie matches the supplied request .