WPDev.one
Core Class

Jar

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

Cookie holder object

Methods 10 methods

Method / Return Description
__construct()
void

Create a new jar

Parameters: $cookies: mixed
normalize_cookie()
\WpOrg\Requests\Cookie

Normalise cookie data into a \WpOrg\Requests\Cookie

Parameters: $cookie: mixed, $key: mixed
offsetExists()
boolean

Check if the given item exists

Parameters: $offset: mixed
offsetGet()
(string

Get the value for the item

Parameters: $offset: mixed
offsetSet()
void

Set the given item

Parameters: $offset: mixed, $value: mixed
offsetUnset()
void

Unset the given header

Parameters: $offset: mixed
getIterator()
\ArrayIterator

Get an iterator for the data

register()
void

Register the cookie handler with the request's hooking system

Parameters: $hooks: HookManager
before_request()
void

Add Cookie header to a request if we have any

Parameters: $url: mixed, $headers: mixed, $data: mixed, $type: mixed, $options: mixed
before_redirect_check()
void

Parse all cookies from a response and attach them to the response

Parameters: $response: Response

Properties

Property / Type Description
$cookies
mixed
public
No description available.

Class Information

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