AttributeBag
class AttributeBag implements AttributeBagInterface, IteratorAggregate, Countable
This class relates to session attribute storage.
Methods
Constructor.
Gets this bag's name.
No description
Initializes the Bag.
Gets the storage key for this bag.
Checks if an attribute is defined.
Returns an attribute.
Sets an attribute.
Returns attributes.
Sets attributes.
Removes an attribute.
Clears out data from bag.
Returns an iterator for attributes.
Returns the number of attributes.
Details
at line line 36
__construct(string $storageKey = '_sf2_attributes')
Constructor.
at line line 44
string
getName()
Gets this bag's name.
at line line 49
setName($name)
at line line 57
initialize(array $attributes)
Initializes the Bag.
at line line 65
string
getStorageKey()
Gets the storage key for this bag.
at line line 73
bool
has(string $name)
Checks if an attribute is defined.
at line line 81
mixed
get(string $name, mixed $default = null)
Returns an attribute.
at line line 89
set(string $name, mixed $value)
Sets an attribute.
at line line 97
array
all()
Returns attributes.
at line line 105
replace(array $attributes)
Sets attributes.
at line line 116
mixed
remove(string $name)
Removes an attribute.
at line line 130
mixed
clear()
Clears out data from bag.
at line line 143
ArrayIterator
getIterator()
Returns an iterator for attributes.
at line line 153
int
count()
Returns the number of attributes.