HumHub Documentation (unofficial)

Cookie extends ArrayObject
in package
implements HeaderInterface

Tags
see
http://www.ietf.org/rfc/rfc2109.txt
see
http://www.w3.org/Protocols/rfc2109/rfc2109

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
string

fromSetCookieArray()

public static fromSetCookieArray(array<string|int, mixed> $setCookies) : static
Parameters
$setCookies : array<string|int, mixed>
Return values
static

fromString()

Factory to generate a header object from a string

public static fromString(string $headerLine) : static
Parameters
$headerLine : string
Return values
static

getEncodeValue()

public getEncodeValue() : bool
Return values
bool

getFieldName()

Retrieve header name

public getFieldName() : string
Return values
string

getFieldValue()

Retrieve header value

public getFieldValue() : string
Return values
string

setEncodeValue()

public setEncodeValue(bool $encodeValue) : $this
Parameters
$encodeValue : bool
Return values
$this

toString()

Cast to string

public toString() : string
Return values
string

flattenCookies()

protected flattenCookies(iterable<string, string> $data[, null|string $prefix = null ]) : array<string, string>
Parameters
$data : iterable<string, string>
$prefix : null|string = null
Return values
array<string, string>

        
On this page

Search results