[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/ -> class-wp-http-cookie.php (summary)

HTTP API: WP_Http_Cookie class

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

Defines 1 class

WP_Http_Cookie:: (5 methods):
  __construct()
  test()
  getHeaderValue()
  getFullHeader()
  get_attributes()


Class: WP_Http_Cookie  - X-Ref

Core class used to encapsulate a single cookie object for internal use.

Returned cookies are represented using this class, and when cookies are set, if they are not
already a WP_Http_Cookie() object, then they are turned into one.

__construct( $data, $requested_url = '' )   X-Ref
Sets up this cookie object.

The parameter $data should be either an associative array containing the indices names below
or a header string detailing it.

since: 2.8.0
since: 5.2.0 Added `host_only` to the `$data` parameter.
param: string|array $data {
param: string       $requested_url The URL which the cookie was set on, used for default $domain

test( $url )   X-Ref
Confirms that it's OK to send this cookie to the URL checked against.

Decision is based on RFC 2109/2965, so look there for details on validity.

since: 2.8.0
return: bool true if allowed, false otherwise.
param: string $url URL you intend to send this cookie to

getHeaderValue()   X-Ref
Convert cookie name and value back to header string.

since: 2.8.0
return: string Header encoded cookie name and value.

getFullHeader()   X-Ref
Retrieve cookie header for usage in the rest of the WordPress HTTP API.

since: 2.8.0
return: string

get_attributes()   X-Ref
Retrieves cookie attributes.

since: 4.6.0
return: array {



Generated: Thu Apr 25 01:00:03 2024 Cross-referenced by PHPXref 0.7.1