Flash\FlashBagInterface (Component\HttpFoundation\Session)
Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface
interface FlashBagInterface implements SessionBagInterface
FlashBagInterface.
Methods
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, string $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. |
Details
public string getName()
Gets this bag's name
public initialize(array $array)
Initializes the Bag
public string getStorageKey()
Gets the storage key for this bag.
public mixed clear()
Clears out data from bag.
public add(string $type, string $message)
Adds a flash message for type.
public set(string $type, string|array $message)
Registers a message for a given type.
public array peek(string $type, array $default = array())
Gets flash messages for a given type.
public array peekAll()
Gets all flash messages.
public array get(string $type, array $default = array())
Gets and clears flash from the stack.
public array all()
Gets and clears flashes from the stack.
public setAll(array $messages)
Sets all flash messages.
public bool has(string $type)
Has flash messages for a given type?
public array keys()
Returns a list of all defined types.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.html