Base
extends SessionHandler
in package
Base Session Class.
Tags
Table of Contents
- __construct() : mixed
- Construct.
- clean() : array<string|int, string>
- Function to clean session. Removed old session.
- cleanAll() : int
- Function to clean all session.
- delete() : mixed
- Function to remove the value.
- get() : mixed
- Function to get the value for a given key.
- getById() : array<string|int, mixed>
- Function to get session data by id.
- has() : bool
- Function to check if the key exists.
- isSupported() : bool
- Is driver available.
- regenerateId() : mixed
- Update the current session id with a newly generated one.
- set() : $this
- Function to set the value for a given key.
Methods
__construct()
Construct.
public
__construct([string $name = 'YTSID' ]) : mixed
Parameters
- $name : string = 'YTSID'
Return values
mixed —clean()
Function to clean session. Removed old session.
public
static clean() : array<string|int, string>
Return values
array<string|int, string> —cleanAll()
Function to clean all session.
public
static cleanAll() : int
Return values
int —delete()
Function to remove the value.
public
delete(string $key) : mixed
Parameters
- $key : string
Return values
mixed —get()
Function to get the value for a given key.
public
get(string $key) : mixed
Parameters
- $key : string
Return values
mixed —Value for the given key
getById()
Function to get session data by id.
public
getById(string $sessionId) : array<string|int, mixed>
Parameters
- $sessionId : string
Return values
array<string|int, mixed> —has()
Function to check if the key exists.
public
has(string $key) : bool
Parameters
- $key : string
Return values
bool —isSupported()
Is driver available.
public
static isSupported() : bool
Return values
bool —regenerateId()
Update the current session id with a newly generated one.
public
regenerateId([bool $deleteOldSession = false ]) : mixed
Parameters
- $deleteOldSession : bool = false
Tags
Return values
mixed —set()
Function to set the value for a given key.
public
set(string $key, mixed $value) : $this
Parameters
- $key : string
- $value : mixed