Requests_Cookie_Jar::__construct() WordPress Method

The constructor for the Requests_Cookie_Jar class. This method accepts an array of cookies as its only parameter. The array can be of the form: array( 'name' => 'value', 'name2' => 'value2', // ... ) or an array of Requests_Cookie objects: array( new Requests_Cookie('name', 'value'), new Requests_Cookie('name2', 'value2'), // ... )

Requests_Cookie_Jar::__construct( array $cookies = array() ) #

Create a new jar


Parameters

$cookies

(array)(Optional)Existing cookie values

Default value: array()


Top ↑

Source

File: wp-includes/Requests/Cookie/Jar.php

	public function __construct($cookies = array()) {
		$this->cookies = $cookies;
	}

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.