Session
class Session implements SessionInterface, IteratorAggregate, Countable
Properties
protected | $storage |
Methods
No description
Starts the session storage.
Checks if an attribute is defined.
Returns an attribute.
Sets an attribute.
Returns attributes.
Sets attributes.
Removes an attribute.
Clears all attributes.
Checks if the session was started.
Returns an iterator for attributes.
Returns the number of attributes.
No description
No description
Invalidates the current session.
Migrates the current session to a new session id while maintaining all session attributes.
Force the session to be saved and closed.
Returns the session ID.
Sets the session ID.
Returns the session name.
Sets the session name.
Gets session meta.
Gets a bag instance by name.
Gets the flashbag interface.
Details
__construct(SessionStorageInterface $storage = null, AttributeBagInterface $attributes = null, FlashBagInterface $flashes = null)
bool
invalidate(int $lifetime = null)
Invalidates the current session.
Clears all session attributes and flashes and regenerates the session and deletes the old session from persistence.
bool
migrate(bool $destroy = false, int $lifetime = null)
Migrates the current session to a new session id while maintaining all session attributes.