WordPress at Your Fingertips
function is not described

Requests_Cookie::__construct() public WP 1.0

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
$flags **
-
Default: array()
$reference_time **
-
Default: null

Code of Requests_Cookie::__construct() WP 5.8

<?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();
}