start()
start() : bool
Starts the session storage.
Throws
- \RuntimeException
if session fails to start
Interface for the session.
invalidate(int|null $lifetime = null) : bool
Invalidates the current session.
Clears all session attributes and flashes and regenerates the session and deletes the old session from persistence.
int|null | $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. |
migrate(bool $destroy = false, int|null $lifetime = null) : bool
Migrates the current session to a new session id while maintaining all session attributes.
bool | $destroy | Whether to delete the old session or leave it to garbage collection |
int|null | $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. |