Reference

Guide

$session->pull()

Retrieves a value and removes it afterwards

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

Parameters

Name Type Default Description
$key string

The key to get

$default mixed null

Optional default value to return if the key is not defined

Return type

mixed

Source code

kirby/src/Session/SessionData.php#L197