Skip to content

$session->set()

Sets one or multiple session values by key

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

Parameters

Name Type Default Description
$key * string|array 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