Skip to content

Kirby 4.4.1

$session->set()

Sets one or multiple session values by key

$session->set(array|string $key, mixed $value = null): void

Parameters

Name Type Default Description
$key * array|string The key to define or a key-value array with multiple values
$value mixed null The value for the passed key (only if one $key is passed)

Parent class

Kirby\Session\SessionData