WpOrg\Requests
Cookie::uri_matches
Check if a cookie is valid for a given URI
Метод класса: Cookie{}
Хуков нет.
Возвращает
true|false. Whether the cookie is valid for the given URI
Использование
$Cookie = new Cookie(); $Cookie->uri_matches( $uri );
- $uri(WpOrg\Requests\Iri) (обязательный)
- URI to check.
Код Cookie::uri_matches() Cookie::uri matches WP 7.0.3
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';
}