AttributeBag
class AttributeBag implements AttributeBagInterface, IteratorAggregate, Countable
This class relates to session attribute storage.
Properties
protected | $attributes |
Methods
__construct(string $storageKey = '_sf2_attributes')
No description
string
getName()
Gets this bag's name.
setName($name)
No description
initialize(array $attributes)
Initializes the Bag.
string
getStorageKey()
Gets the storage key for this bag.
bool
has(string $name)
Checks if an attribute is defined.
mixed
get(string $name, mixed $default = null)
Returns an attribute.
set(string $name, mixed $value)
Sets an attribute.
array
all()
Returns attributes.
replace(array $attributes)
Sets attributes.
mixed
remove(string $name)
Removes an attribute.
mixed
clear()
Clears out data from bag.
getIterator()
Returns an iterator for attributes.
int
count()
Returns the number of attributes.