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

string getName()

Gets this bag's name.

Return Value

string

initialize(array $array)

Initializes the Bag.

Parameters

array $array

string getStorageKey()

Gets the storage key for this bag.

Return Value

string

mixed clear()

Clears out data from bag.

Return Value

mixed Whatever data was contained

add(string $type, string $message)

Adds a flash message for type.

Parameters

string $type
string $message

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

Registers a message for a given type.

Parameters

string $type
string|array $message

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

array peekAll()

Gets all flash messages.

Return Value

array

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

array all()

Gets and clears flashes from the stack.

Return Value

array

setAll(array $messages)

Sets all flash messages.

Parameters

array $messages

bool has(string $type)

Has flash messages for a given type?

Parameters

string $type

Return Value

bool

array keys()

Returns a list of all defined types.

Return Value

array
doc_Symfony
2016-10-28 06:17:05
Comments
Leave a Comment

Please login to continue.