Skip to content

Kirby 4.5.0

$session->get()

Returns one or all session values by key

$session->get(?string $key = null, mixed $default = null): mixed|null

Parameters

Name Type Default Description
$key string|null null The key to get or null for the entire data array
$default mixed null Optional default value to return if the key is not defined

Return type

mixed|null

Parent class

Kirby\Session\SessionData