Uses
Uses | Description |
---|---|
wp-includes/Requests/Cookie.php: Requests_Cookie::normalize() | Normalize cookie and attributes |
Create a new cookie object
(string) (Required)
(string) (Required)
(array|Requests_Utility_CaseInsensitiveDictionary) (Optional) Associative array of attribute data
Default value: array()
File: wp-includes/Requests/Cookie.php
public function __construct($name, $value, $attributes = array(), $flags = array(), $reference_time = null) { $this->name = $name; $this->value = $value; $this->attributes = $attributes; $default_flags = array( 'creation' => time(), 'last-access' => time(), 'persistent' => false, 'host-only' => true, ); $this->flags = array_merge($default_flags, $flags); $this->reference_time = time(); if ($reference_time !== null) { $this->reference_time = $reference_time; } $this->normalize(); }
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/requests_cookie/__construct