Internal representation of a single cookie.
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.
todo | The WordPress convention is to use underscores instead of camelCase for function and method names. Need to switch to use underscores instead for the methods. |
---|---|
package | WordPress |
subpackage | HTTP |
since | 2.8.0 |
author | Beau Lebens |
WP_Http_Cookie(string|array $data)
access | public |
---|---|
since | 2.8.0 |
string
array
Raw cookie data.
__construct(string|array $data)
The parameter $data should be either an associative array containing the indices names below or a header string detailing it.
If it's an array, it should include the following elements:
access | public |
---|---|
since | 2.8.0 |
string
array
Raw cookie data.
getFullHeader() : string
access | public |
---|---|
since | 2.8.0 |
string
getHeaderValue() : string
access | public |
---|---|
since | 2.8.0 |
string
Header encoded cookie name and value.test(string $url) : boolean
Decision is based on RFC 2109/2965, so look there for details on validity.
access | public |
---|---|
since | 2.8.0 |
string
URL you intend to send this cookie to
boolean
TRUE if allowed, FALSE otherwise.$domain : string
since | 2.8.0 |
---|
$expires : string
since | 2.8.0 |
---|
$name : string
since | 2.8.0 |
---|
$path : string
since | 2.8.0 |
---|
$value : string
since | 2.8.0 |
---|