SymfonyComponentHttpFoundationSessionFlashFlashBagInterface

FlashBagInterface.

Summary

No protected methods found
N/A
No private methods found
N/A

Methods

getName()

getName() : string

Gets this bag's name

Returns

string

initialize()

initialize(array  $array) 

Initializes the Bag

Parameters

array $array

getStorageKey()

getStorageKey() : string

Gets the storage key for this bag.

Returns

string

clear()

clear() : mixed

Clears out data from bag.

Returns

mixed —

Whatever data was contained.

add()

add(string  $type, string  $message) 

Adds a flash message for type.

Parameters

string $type
string $message

Tags

None found

set()

set(string  $type, string|array  $message) 

Registers a message for a given type.

Parameters

string $type
string|array $message

Tags

None found

peek()

peek(string  $type, array  $default = array()) : array

Gets flash messages for a given type.

Parameters

string $type

Message category type.

array $default

Default value if $type does not exist.

Returns

array

Tags

None found

peekAll()

peekAll() : array

Gets all flash messages.

Returns

array

Tags

None found

get()

get(string  $type, array  $default = array()) : array

Gets and clears flash from the stack.

Parameters

string $type
array $default

Default value if $type does not exist.

Returns

array

Tags

None found

all()

all() : array

Gets and clears flashes from the stack.

Returns

array

Tags

None found

setAll()

setAll(array  $messages) 

Sets all flash messages.

Parameters

array $messages

Tags

None found

has()

has(string  $type) : boolean

Has flash messages for a given type?

Parameters

string $type

Returns

boolean

Tags

None found

keys()

keys() : array

Returns a list of all defined types.

Returns

array

Tags

None found