\Symfony\Component\HttpFoundation\Session\AttributeAttributeBag

This class relates to session attribute storage.

Summary

Methods
Properties
Constants
__construct()
getName()
setName()
initialize()
getStorageKey()
has()
get()
set()
all()
replace()
remove()
clear()
getIterator()
count()
No public properties found
No constants found
No protected methods found
$attributes
N/A
No private methods found
$name
$storageKey
N/A

Properties

$attributes

$attributes

$name

$name

$storageKey

$storageKey

Methods

__construct()

__construct(string  $storageKey = '_sf2_attributes') : mixed

Parameters

string $storageKey

The key used to store attributes in the session

Returns

mixed —

getName()

getName() : mixed

{@inheritdoc}

Returns

mixed —

setName()

setName(string  $name) : mixed

Parameters

string $name

Returns

mixed —

initialize()

initialize(array  $attributes) : mixed

{@inheritdoc}

Parameters

array $attributes

Returns

mixed —

getStorageKey()

getStorageKey() : mixed

{@inheritdoc}

Returns

mixed —

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

clear()

clear() : mixed

{@inheritdoc}

Returns

mixed —

getIterator()

getIterator() : \ArrayIterator<string,mixed>

Returns an iterator for attributes.

Returns

\ArrayIterator

count()

count() : int

Returns the number of attributes.

Returns

int —