SessionManagerInterface
Factory interface for creating session instances.
This allows for different session implementations and custom initialization logic.
Tags
Table of Contents
Methods
- create() : SessionInterface
- Creates a new session with an auto-generated UUID.
- createWithId() : SessionInterface
- Creates a session with a specific UUID.
- destroy() : bool
- Destroys the session with the given UUID.
- exists() : bool
- Checks if a session with the given UUID exists.
- gc() : void
Methods
create()
Creates a new session with an auto-generated UUID.
public
create() : SessionInterface
This is the standard factory method for creating sessions.
Return values
SessionInterfacecreateWithId()
Creates a session with a specific UUID.
public
createWithId(Uuid $id) : SessionInterface
Use this when you need to reconstruct a session with a known ID.
Parameters
- $id : Uuid
Return values
SessionInterfacedestroy()
Destroys the session with the given UUID.
public
destroy(Uuid $id) : bool
Parameters
- $id : Uuid
Return values
boolexists()
Checks if a session with the given UUID exists.
public
exists(Uuid $id) : bool
Parameters
- $id : Uuid
Return values
boolgc()
public
gc() : void