class CookieManager (View source)

Manage multiple cookies of different types at one time

Methods

add(CookieInterface $cookie)

Add a cookie to the stack

register(CookieInterface $cookie) deprecated

No description

del(CookieInterface|string $cookie)

Delete a cookie from the stack

unregister(CookieInterface|string $cookie) deprecated

No description

has(CookieInterface|string $cookie)

Check if a cookie is into the stack

isRegistered(CookieInterface|string $cookie) deprecated

No description

get(string $cookie_name)

Get cookie from $cookie_name

array
getAll()

Get the whole cookies' archive

array
getValues()

Get values from all registered cookies and dump as an associative array

save()

Save all registered cookies

load()

Load all registered cookies

Details

CookieManager add(CookieInterface $cookie)

Add a cookie to the stack

Parameters

CookieInterface $cookie

Return Value

CookieManager

CookieManager register(CookieInterface $cookie) deprecated

deprecated 2.1.0

Parameters

CookieInterface $cookie

Return Value

CookieManager

See also

CookieManager::add Add a cookie to the stack

CookieManager del(CookieInterface|string $cookie)

Delete a cookie from the stack

Parameters

CookieInterface|string $cookie

Return Value

CookieManager

Exceptions

CookieException

CookieManager unregister(CookieInterface|string $cookie) deprecated

deprecated 2.1.0

Parameters

CookieInterface|string $cookie

Return Value

CookieManager

Exceptions

CookieException

See also

CookieManager::del Delete a cookie from the stack

CookieManager has(CookieInterface|string $cookie)

Check if a cookie is into the stack

Parameters

CookieInterface|string $cookie

Return Value

CookieManager

Exceptions

CookieException

CookieManager isRegistered(CookieInterface|string $cookie) deprecated

deprecated 2.1.0

Parameters

CookieInterface|string $cookie

Return Value

CookieManager

Exceptions

CookieException

See also

CookieManager::has Check if a cookie is into the stack

CookieInterface get(string $cookie_name)

Get cookie from $cookie_name

Parameters

string $cookie_name

Return Value

CookieInterface

Exceptions

CookieException

array getAll()

Get the whole cookies' archive

Return Value

array

array getValues()

Get values from all registered cookies and dump as an associative array

Return Value

array

Exceptions

CookieException

CookieManager save()

Save all registered cookies

Return Value

CookieManager

Exceptions

CookieException

CookieManager load()

Load all registered cookies

Return Value

CookieManager

Exceptions

CookieException