[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/Requests/src/Cookie/ -> Jar.php (summary)

Cookie holder object

File Size: 187 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Jar:: (10 methods):
  __construct()
  normalize_cookie()
  offsetExists()
  offsetGet()
  offsetSet()
  offsetUnset()
  getIterator()
  register()
  before_request()
  before_redirect_check()


Class: Jar  - X-Ref

Cookie holder object

__construct($cookies = [])   X-Ref
Create a new jar

param: array $cookies Existing cookie values

normalize_cookie($cookie, $key = '')   X-Ref
Normalise cookie data into a \WpOrg\Requests\Cookie

param: string|\WpOrg\Requests\Cookie $cookie Cookie header value, possibly pre-parsed (object).
param: string                        $key    Optional. The name for this cookie.
return: \WpOrg\Requests\Cookie

offsetExists($offset)   X-Ref
Check if the given item exists

param: string $offset Item key
return: boolean Does the item exist?

offsetGet($offset)   X-Ref
Get the value for the item

param: string $offset Item key
return: string|null Item value (null if offsetExists is false)

offsetSet($offset, $value)   X-Ref
Set the given item

param: string $offset Item name
param: string $value Item value

offsetUnset($offset)   X-Ref
Unset the given header

param: string $offset The key for the item to unset.

getIterator()   X-Ref
Get an iterator for the data

return: \ArrayIterator

register(HookManager $hooks)   X-Ref
Register the cookie handler with the request's hooking system

param: \WpOrg\Requests\HookManager $hooks Hooking system

before_request($url, &$headers, &$data, &$type, &$options)   X-Ref
Add Cookie header to a request if we have any

As per RFC 6265, cookies are separated by '; '

param: string $url
param: array $headers
param: array $data
param: string $type
param: array $options

before_redirect_check(Response $response)   X-Ref
Parse all cookies from a response and attach them to the response

param: \WpOrg\Requests\Response $response Response as received.



Generated : Wed Dec 25 08:20:01 2024 Cross-referenced by PHPXref