path_matches example

/** * Check if a cookie is valid for a given URI * * @param \WpOrg\Requests\Iri $uri URI to check * @return boolean Whether the cookie is valid for the given URI */
    public function uri_matches(Iri $uri) {
        if (!$this->domain_matches($uri->host)) {
            return false;
        }

        if (!$this->path_matches($uri->path)) {
            return false;
        }

        return empty($this->attributes['secure']) || $uri->scheme === 'https';
    }

    /** * Check if a cookie is valid for a given domain * * @param string $domain Domain to check * @return boolean Whether the cookie is valid for the given domain */
Home | Imprint | This part of the site doesn't use cookies.