Requests_Cookie::__construct()
Create a new cookie object
{} It's a method of the class: Requests_Cookie{}
No Hooks.
Return
null
. Nothing.
Usage
$Requests_Cookie = new Requests_Cookie(); $Requests_Cookie->__construct( $name, $value, $attributes, $flags, $reference_time );
- $name(string) (required)
- -
- $value(string) (required)
- -
- $attributes(array|Requests_Utility_CaseInsensitiveDictionary)
- Associative array of attribute data
Default: array() - $flags **
- -
Default: array() - $reference_time **
- -
Default: null
Code of Requests_Cookie::__construct() Requests Cookie:: construct WP 6.0
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(); }