\Symfony\Component\HttpFoundation\Session\AttributeAttributeBagInterface

Attributes store.

Summary

Methods
Constants
getName()
initialize()
getStorageKey()
clear()
has()
get()
set()
all()
replace()
remove()
No constants found
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

has()

has(string  $name) : boolean

Checks if an attribute is defined.

Parameters

string $name

The attribute name

Returns

boolean —

true if the attribute is defined, false otherwise

get()

get(string  $name, mixed  $default = null) : mixed

Returns an attribute.

Parameters

string $name

The attribute name

mixed $default

The default value if not found

Returns

mixed

set()

set(string  $name, mixed  $value) 

Sets an attribute.

Parameters

string $name
mixed $value

all()

all() : array

Returns attributes.

Returns

array —

Attributes

replace()

replace(array  $attributes) 

Sets attributes.

Parameters

array $attributes

Attributes

remove()

remove(string  $name) : mixed

Removes an attribute.

Parameters

string $name

Returns

mixed —

The removed value or null when it does not exist