Cookie
extends ArrayObject
in package
implements
HeaderInterface
Tags
Table of Contents
Interfaces
- HeaderInterface
- Interface for HTTP Header classes.
Properties
- $encodeValue : bool
Methods
- __construct() : mixed
- __toString() : string
- Get the cookie as a string, suitable for sending as a "Cookie" header in an HTTP request
- fromSetCookieArray() : static
- fromString() : static
- Factory to generate a header object from a string
- getEncodeValue() : bool
- getFieldName() : string
- Retrieve header name
- getFieldValue() : string
- Retrieve header value
- setEncodeValue() : $this
- toString() : string
- Cast to string
- flattenCookies() : array<string, string>
Properties
$encodeValue
protected
bool
$encodeValue
= true
Methods
__construct()
public
__construct([array<string|int, mixed> $array = [] ]) : mixed
Parameters
- $array : array<string|int, mixed> = []
__toString()
Get the cookie as a string, suitable for sending as a "Cookie" header in an HTTP request
public
__toString() : string
Return values
stringfromSetCookieArray()
public
static fromSetCookieArray(array<string|int, mixed> $setCookies) : static
Parameters
- $setCookies : array<string|int, mixed>
Return values
staticfromString()
Factory to generate a header object from a string
public
static fromString(string $headerLine) : static
Parameters
- $headerLine : string
Return values
staticgetEncodeValue()
public
getEncodeValue() : bool
Return values
boolgetFieldName()
Retrieve header name
public
getFieldName() : string
Return values
stringgetFieldValue()
Retrieve header value
public
getFieldValue() : string
Return values
stringsetEncodeValue()
public
setEncodeValue(bool $encodeValue) : $this
Parameters
- $encodeValue : bool
Return values
$thistoString()
Cast to string
public
toString() : string
Return values
stringflattenCookies()
protected
flattenCookies(iterable<string, string> $data[, null|string $prefix = null ]) : array<string, string>
Parameters
- $data : iterable<string, string>
- $prefix : null|string = null