WPDev.one
Core Class

Cookie

class Cookie // Constructor: function Object() { [native code] }

Cookie storage object

Methods 12 methods

Method / Return Description
__construct()
void

Create a new cookie object

Parameters: $name: mixed, $value: mixed, $attributes: mixed, $flags: mixed, $reference_time: mixed
__toString()
void

Get the cookie value

is_expired()
boolean

Check if a cookie is expired.

uri_matches()
boolean

Check if a cookie is valid for a given URI

Parameters: $uri: Iri
domain_matches()
boolean

Check if a cookie is valid for a given domain

Parameters: $domain: mixed
path_matches()
boolean

Check if a cookie is valid for a given path

Parameters: $request_path: mixed
normalize()
boolean

Normalize cookie and attributes

normalize_attribute()
mixed

Parse an individual cookie attribute

Parameters: $name: mixed, $value: mixed
format_for_header()
string

Format a cookie for a Cookie header

format_for_set_cookie()
string

Format a cookie for a Set-Cookie header

parse()
\WpOrg\Requests\Cookie

Parse a cookie string into a cookie object

Parameters: $cookie_header: mixed, $name: mixed, $reference_time: mixed
parse_from_headers()
array

Parse all Set-Cookie headers from request headers

Parameters: $headers: Headers, $origin: mixed, $time: mixed

Properties

Property / Type Description
$name
mixed
public
No description available.
$value
mixed
public
No description available.
$attributes
mixed
public
No description available.
$flags
mixed
public
No description available.
$reference_time
mixed
public
No description available.

Class Information

Source File
wp-includes/Requests/src/Cookie.php
Advertisement