AutoExpireFlashBag
in package
implements
FlashBagInterface
AutoExpireFlashBag flash message container.
Tags
Interfaces, Classes and Traits
- FlashBagInterface
- FlashBagInterface.
Table of Contents
- $flashes : mixed
- $name : mixed
- $storageKey : mixed
- __construct() : mixed
- add() : mixed
- Adds a flash message for the given type.
- all() : array<string|int, mixed>
- Gets and clears flashes from the stack.
- clear() : mixed
- {@inheritdoc}
- get() : array<string|int, mixed>
- Gets and clears flash from the stack.
- getName() : mixed
- {@inheritdoc}
- getStorageKey() : mixed
- {@inheritdoc}
- has() : bool
- Has flash messages for a given type?
- initialize() : mixed
- {@inheritdoc}
- keys() : array<string|int, mixed>
- Returns a list of all defined types.
- peek() : array<string|int, mixed>
- Gets flash messages for a given type.
- peekAll() : array<string|int, mixed>
- Gets all flash messages.
- set() : mixed
- Registers one or more messages for a given type.
- setAll() : mixed
- Sets all flash messages.
- setName() : mixed
Properties
$flashes
private
mixed
$flashes
= ['display' => [], 'new' => []]
$name
private
mixed
$name
= 'flashes'
$storageKey
private
mixed
$storageKey
Methods
__construct()
public
__construct([string $storageKey = '_symfony_flashes' ]) : mixed
Parameters
- $storageKey : string = '_symfony_flashes'
-
The key used to store flashes in the session
Return values
mixed —add()
Adds a flash message for the given type.
public
add(string $type, mixed $message) : mixed
Parameters
- $type : string
- $message : mixed
Return values
mixed —all()
Gets and clears flashes from the stack.
public
all() : array<string|int, mixed>
Return values
array<string|int, mixed> —clear()
{@inheritdoc}
public
clear() : mixed
Return values
mixed —get()
Gets and clears flash from the stack.
public
get(string $type[, array<string|int, mixed> $default = [] ]) : array<string|int, mixed>
Parameters
- $type : string
- $default : array<string|int, mixed> = []
-
Default value if $type does not exist
Return values
array<string|int, mixed> —getName()
{@inheritdoc}
public
getName() : mixed
Return values
mixed —getStorageKey()
{@inheritdoc}
public
getStorageKey() : mixed
Return values
mixed —has()
Has flash messages for a given type?
public
has(string $type) : bool
Parameters
- $type : string
Return values
bool —initialize()
{@inheritdoc}
public
initialize(array<string|int, mixed> &$flashes) : mixed
Parameters
- $flashes : array<string|int, mixed>
Return values
mixed —keys()
Returns a list of all defined types.
public
keys() : array<string|int, mixed>
Return values
array<string|int, mixed> —peek()
Gets flash messages for a given type.
public
peek(string $type[, array<string|int, mixed> $default = [] ]) : array<string|int, mixed>
Parameters
- $type : string
-
Message category type
- $default : array<string|int, mixed> = []
-
Default value if $type does not exist
Return values
array<string|int, mixed> —peekAll()
Gets all flash messages.
public
peekAll() : array<string|int, mixed>
Return values
array<string|int, mixed> —set()
Registers one or more messages for a given type.
public
set(string $type, mixed $messages) : mixed
Parameters
- $type : string
- $messages : mixed
Return values
mixed —setAll()
Sets all flash messages.
public
setAll(array<string|int, mixed> $messages) : mixed
Parameters
- $messages : array<string|int, mixed>
Return values
mixed —setName()
public
setName(string $name) : mixed
Parameters
- $name : string