interface FlashBagInterface implements SessionBagInterface

FlashBagInterface.

Methods

string
getName()

Gets this bag's name

initialize(array $array)

Initializes the Bag

string
getStorageKey()

Gets the storage key for this bag.

mixed
clear()

Clears out data from bag.

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

in SessionBagInterface at line line 26
string getName()

Gets this bag's name

Return Value

string

in SessionBagInterface at line line 33
initialize(array $array)

Initializes the Bag

Parameters

array $array

in SessionBagInterface at line line 40
string getStorageKey()

Gets the storage key for this bag.

Return Value

string

in SessionBagInterface at line line 47
mixed clear()

Clears out data from bag.

Return Value

mixed Whatever data was contained.

at line line 29
add(string $type, string $message)

Adds a flash message for type.

Parameters

string $type
string $message

at line line 37
set(string $type, string|array $message)

Registers a message for a given type.

Parameters

string $type
string|array $message

at line line 47
array peek(string $type, array $default = array())

Gets flash messages for a given type.

Parameters

string $type Message category type.
array $default Default value if $type does not exist.

Return Value

array

at line line 54
array peekAll()

Gets all flash messages.

Return Value

array

at line line 64
array get(string $type, array $default = array())

Gets and clears flash from the stack.

Parameters

string $type
array $default Default value if $type does not exist.

Return Value

array

at line line 71
array all()

Gets and clears flashes from the stack.

Return Value

array

at line line 76
setAll(array $messages)

Sets all flash messages.

Parameters

array $messages

at line line 85
bool has(string $type)

Has flash messages for a given type?

Parameters

string $type

Return Value

bool

at line line 92
array keys()

Returns a list of all defined types.

Return Value

array