Skip to content

Kirby 4.5.0

Cookie::get()

Get a cookie value

Cookie::get(?string $key = null, ?string $default = null): array|string|null

Parameters

Name Type Default Description
$key string|null null The name of the cookie
$default string|null null The default value, which should be returned
if the cookie has not been found

Return type

array|string|null

Parent class

Kirby\Http\Cookie