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 |
stringarrayRaw 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 |
stringarrayRaw cookie data.
getFullHeader() : string
| access | public |
|---|---|
| since | 2.8.0 |
stringgetHeaderValue() : string
| access | public |
|---|---|
| since | 2.8.0 |
stringHeader 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 |
stringURL you intend to send this cookie to
booleanTRUE 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 |
|---|