interface FlashBagInterface implements SessionBagInterface
FlashBagInterface.
string | getName() Gets this bag's name. | from SessionBagInterface |
initialize(array $array) Initializes the Bag. | from SessionBagInterface | |
string | getStorageKey() Gets the storage key for this bag. | from SessionBagInterface |
mixed | clear() Clears out data from bag. | from SessionBagInterface |
add(string $type, mixed $message) Adds a flash message for type. | ||
set(string $type, string|array $message) Registers a message for a given type. | ||
array | peek(string $type, array $default = array()) Gets flash messages for a given type. | |
array | peekAll() Gets all flash messages. | |
array | get(string $type, array $default = array()) Gets and clears flash from the stack. | |
array | all() Gets and clears flashes from the stack. | |
setAll(array $messages) Sets all flash messages. | ||
bool | has(string $type) Has flash messages for a given type? | |
array | keys() Returns a list of all defined types. |
Gets this bag's name.
string |
Initializes the Bag.
array | $array |
Gets the storage key for this bag.
string |
Clears out data from bag.
mixed | Whatever data was contained |
Adds a flash message for type.
string | $type | |
mixed | $message |
Registers a message for a given type.
string | $type | |
string|array | $message |
Gets flash messages for a given type.
string | $type | Message category type |
array | $default | Default value if $type does not exist |
array |
Gets all flash messages.
array |
Gets and clears flash from the stack.
string | $type | |
array | $default | Default value if $type does not exist |
array |
Gets and clears flashes from the stack.
array |
Sets all flash messages.
array | $messages |
Has flash messages for a given type?
string | $type |
bool |
Returns a list of all defined types.
array |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.html