Skip to content

Kirby 3.5.7.1

$session->get()

Returns one or all session values by key

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

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

Parent class

Kirby\Session\SessionData