\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) : mixed

Initializes the Bag.

Parameters

array $array

Returns

mixed —

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) : bool

Checks if an attribute is defined.

Parameters

string $name

Returns

bool —

get()

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

Returns an attribute.

Parameters

string $name
mixed $default

The default value if not found

Returns

mixed —

set()

set(string  $name, mixed  $value) : mixed

Sets an attribute.

Parameters

string $name
mixed $value

Returns

mixed —

all()

all() : array<string,mixed>

Returns attributes.

Returns

array

replace()

replace(array  $attributes) : mixed

Parameters

array $attributes

Returns

mixed —

remove()

remove(string  $name) : mixed

Removes an attribute.

Parameters

string $name

Returns

mixed —

The removed value or null when it does not exist