FlashBagInterface
interface FlashBagInterface (View source)
Provides keyed transient values stored inside the current session
Methods
Stores a transient value under the key
Returns a transient value without removing it
Checks whether a transient value exists for the key
Removes a transient value without returning it
Returns a transient value and removes it from the bag
Returns all transient values keyed by their session names
Removes every transient value from the current session
Details
set
void
set(string $key, mixed $value)
Stores a transient value under the key
get
mixed
get(string $key, mixed $default = null)
Returns a transient value without removing it
has
bool
has(string $key)
Checks whether a transient value exists for the key
remove
void
remove(string $key)
Removes a transient value without returning it
pull
mixed
pull(string $key, mixed $default = null)
Returns a transient value and removes it from the bag
all
array
all()
Returns all transient values keyed by their session names
clear
void
clear()
Removes every transient value from the current session