interface AttributeBagInterface implements SessionBagInterface
Attributes store.
string | getName() Gets this bag's name. | from SessionBagInterface |
initialize(array $array) Initializes the Bag. | from SessionBagInterface | |
string | getStorageKey() Gets the storage key for this bag. | from SessionBagInterface |
mixed | clear() Clears out data from bag. | from SessionBagInterface |
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. |
Gets this bag's name.
string |
Initializes the Bag.
array | $array |
Gets the storage key for this bag.
string |
Clears out data from bag.
mixed | Whatever data was contained |
Checks if an attribute is defined.
string | $name | The attribute name |
bool | true if the attribute is defined, false otherwise |
Returns an attribute.
string | $name | The attribute name |
mixed | $default | The default value if not found |
mixed |
Sets an attribute.
string | $name | |
mixed | $value |
Returns attributes.
array | Attributes |
Sets attributes.
array | $attributes | Attributes |
Removes an attribute.
string | $name |
mixed | The removed value or null when it does not exist |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBagInterface.html