class MetadataBag implements SessionBagInterface
Metadata container.
Adds metadata to the session.
CREATED | |
UPDATED | |
LIFETIME |
protected array | $meta |
__construct(string $storageKey = '_sf2_meta', int $updateThreshold = 0) | ||
initialize(array $array) Initializes the Bag. | ||
int | getLifetime() Gets the lifetime that the session cookie was set with. | |
stampNew(int $lifetime = null) Stamps a new session's metadata. | ||
string | getStorageKey() Gets the storage key for this bag. | |
int | getCreated() Gets the created timestamp metadata. | |
int | getLastUsed() Gets the last used metadata. | |
mixed | clear() Clears out data from bag. | |
string | getName() Gets this bag's name. | |
setName(string $name) Sets name. |
string | $storageKey | The key used to store bag in the session |
int | $updateThreshold | The time to wait between two UPDATED updates |
Initializes the Bag.
array | $array |
Gets the lifetime that the session cookie was set with.
int |
Stamps a new session's metadata.
int | $lifetime | Sets the cookie lifetime for the session cookie. A null value will leave the system settings unchanged, 0 sets the cookie to expire with browser session. Time is in seconds, and is not a Unix timestamp. |
Gets the storage key for this bag.
string |
Gets the created timestamp metadata.
int | Unix timestamp |
Gets the last used metadata.
int | Unix timestamp |
Clears out data from bag.
mixed | Whatever data was contained |
Gets this bag's name.
string |
Sets name.
string | $name |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/HttpFoundation/Session/Storage/MetadataBag.html