SessionInterface
interface SessionInterface
Interface for the session.
Methods
Starts the session storage.
Returns the session ID.
Sets the session ID.
Returns the session name.
Sets the session name.
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.
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.
Gets a bag instance by name.
Gets session meta.
Details
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.