Skip to content

Kirby 5.0.4

$session->pull()

Retrieves a value and removes it afterwards

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

Parameters

Name Type Default Description
$keyrequired string no default value The key to get
$default mixed null Optional default value to return if the key is not defined

Return type

mixed

This method modifies the existing $sessiondata object it is applied to and returns it again.

Parent class

Kirby\Session\SessionData