Requests_Cookie::uri_matches()
最后更新于:2021-11-26 01:33:19
Requests_Cookie::uri_matches( Requests_IRI$uri)Check if a cookie is valid for a given URI
参数
- $uri
-
(Requests_IRI) (Required) URI to check
响应
(boolean) Whether the cookie is valid for the given URI
源文件
文件: gc-includes/Requests/Cookie.php
public function uri_matches(Requests_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';
}