\Symfony\Component\HttpFoundation\Session\FlashFlashBag

FlashBag flash message container.

Summary

Methods
Properties
Constants
__construct()
getName()
setName()
initialize()
add()
peek()
peekAll()
get()
all()
set()
setAll()
has()
keys()
getStorageKey()
clear()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$name
$flashes
$storageKey
N/A

Properties

$name

$name : 

Type

$flashes

$flashes : 

Type

$storageKey

$storageKey : 

Type

Methods

__construct()

__construct(string  $storageKey = '_symfony_flashes') 

Parameters

string $storageKey

The key used to store flashes in the session

getName()

getName() 

{@inheritdoc}

setName()

setName(  $name) 

Parameters

$name

initialize()

initialize(array  $flashes) 

{@inheritdoc}

Parameters

array $flashes

add()

add(string  $type, mixed  $message) 

Adds a flash message for type.

Parameters

string $type
mixed $message

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

peekAll()

peekAll() : array

Gets all flash messages.

Returns

array

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

all()

all() : array

Gets and clears flashes from the stack.

Returns

array

set()

set(string  $type,   $messages) 

Registers a message for a given type.

Parameters

string $type
$messages

setAll()

setAll(array  $messages) 

Sets all flash messages.

Parameters

array $messages

has()

has(string  $type) : boolean

Has flash messages for a given type?

Parameters

string $type

Returns

boolean

keys()

keys() : array

Returns a list of all defined types.

Returns

array

getStorageKey()

getStorageKey() 

{@inheritdoc}

clear()

clear() 

{@inheritdoc}