class NamespacedAttributeBag extends AttributeBag
This class provides structured storage of session attributes using a name spacing character in the key.
Methods
__construct(string $storageKey = '_sf2_attributes', string $namespaceCharacter = '/') Constructor. | ||
string | getName() Gets this bag's name. | from AttributeBag |
setName($name) | from AttributeBag | |
initialize(array $attributes) Initializes the Bag. | from AttributeBag | |
string | getStorageKey() Gets the storage key for this bag. | from AttributeBag |
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. | from AttributeBag |
replace(array $attributes) Sets attributes. | from AttributeBag | |
mixed | remove(string $name) Removes an attribute. | |
mixed | clear() Clears out data from bag. | from AttributeBag |
ArrayIterator | getIterator() Returns an iterator for attributes. | from AttributeBag |
int | count() Returns the number of attributes. | from AttributeBag |
Details
__construct(string $storageKey = '_sf2_attributes', string $namespaceCharacter = '/')
Constructor.
string getName()
Gets this bag's name.
setName($name)
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.
ArrayIterator getIterator()
Returns an iterator for attributes.
int count()
Returns the number of attributes.
Please login to continue.