class CookieJar implements QueueingFactory (View source)

Methods

Cookie
make(string $name, string $value, int $minutes, string $path = null, string $domain = null, bool $secure = false, bool $httpOnly = true)

Create a new cookie instance.

Cookie
forever(string $name, string $value, string $path = null, string $domain = null, bool $secure = false, bool $httpOnly = true)

Create a cookie that lasts "forever" (five years).

Cookie
forget(string $name, string $path = null, string $domain = null)

Expire the given cookie.

bool
hasQueued(string $key)

Determine if a cookie has been queued.

Cookie
queued(string $key, mixed $default = null)

Get a queued cookie instance.

void
queue(array $parameters)

Queue a cookie to send with the next response.

unqueue(string $name)

Remove a cookie from the queue.

$this
setDefaultPathAndDomain(string $path, string $domain, bool $secure = false)

Set the default path and domain for the jar.

array
getQueuedCookies()

Get the cookies which have been queued for the next request.

Details

at line line 52
Cookie make(string $name, string $value, int $minutes, string $path = null, string $domain = null, bool $secure = false, bool $httpOnly = true)

Create a new cookie instance.

Parameters

string $name
string $value
int $minutes
string $path
string $domain
bool $secure
bool $httpOnly

Return Value

Cookie

at line line 72
Cookie forever(string $name, string $value, string $path = null, string $domain = null, bool $secure = false, bool $httpOnly = true)

Create a cookie that lasts "forever" (five years).

Parameters

string $name
string $value
string $path
string $domain
bool $secure
bool $httpOnly

Return Value

Cookie

at line line 85
Cookie forget(string $name, string $path = null, string $domain = null)

Expire the given cookie.

Parameters

string $name
string $path
string $domain

Return Value

Cookie

at line line 96
bool hasQueued(string $key)

Determine if a cookie has been queued.

Parameters

string $key

Return Value

bool

at line line 108
Cookie queued(string $key, mixed $default = null)

Get a queued cookie instance.

Parameters

string $key
mixed $default

Return Value

Cookie

at line line 119
void queue(array $parameters)

Queue a cookie to send with the next response.

Parameters

array $parameters

Return Value

void

at line line 136
unqueue(string $name)

Remove a cookie from the queue.

Parameters

string $name

at line line 162
$this setDefaultPathAndDomain(string $path, string $domain, bool $secure = false)

Set the default path and domain for the jar.

Parameters

string $path
string $domain
bool $secure

Return Value

$this

at line line 174
array getQueuedCookies()

Get the cookies which have been queued for the next request.

Return Value

array