Sessions
extends Model
in package
Sessions Class
Table of Contents
- $db : Database
- Contains the Database instance
- __construct() : mixed
- Constructor
- __destruct() : mixed
- Destructor
- cleanSessionData() : string
- Clean expired session data
- closeConnection() : bool
- Close connection
- deleteSessionDataById() : string
- Delete session data by ID
- getSessionDataById() : array<string|int, mixed>
- Get session data by ID
- insertNewSessionData() : bool
- Insert new sesson data
- openConnection() : bool
- Check if the connection is open
- setNewDb() : void
- Creates a new Database object
Properties
$db
Contains the Database instance
protected
Database
$db
Methods
__construct()
Constructor
public
__construct() : mixed
Return values
mixed —__destruct()
Destructor
public
__destruct() : mixed
Return values
mixed —cleanSessionData()
Clean expired session data
public
cleanSessionData(int $expire) : string
Parameters
- $expire : int
Return values
string —closeConnection()
Close connection
public
closeConnection() : bool
Return values
bool —deleteSessionDataById()
Delete session data by ID
public
deleteSessionDataById(string $sid) : string
Parameters
- $sid : string
Return values
string —getSessionDataById()
Get session data by ID
public
getSessionDataById(string $sid) : array<string|int, mixed>
Parameters
- $sid : string
Return values
array<string|int, mixed> —insertNewSessionData()
Insert new sesson data
public
insertNewSessionData(string $sid, string $data) : bool
Parameters
- $sid : string
- $data : string
Return values
bool —openConnection()
Check if the connection is open
public
openConnection() : bool
Return values
bool —setNewDb()
Creates a new Database object
private
setNewDb() : void