Session
in package
Table of Contents
- $session : mixed
- __construct() : mixed
- get() : string|null
- Retrieve a session variable
- get_id() : string
- Retrieve session ID
- init() : mixed
- set() : mixed
- Set a session variable
- toArray() : array<string|int, mixed>
Properties
$session
private
mixed
$session
= null
Methods
__construct()
public
__construct() : mixed
Return values
mixed —get()
Retrieve a session variable
public
get(string $key) : string|null
Parameters
- $key : string
-
Session key
Return values
string|null —Session variable if setted or null other way.
get_id()
Retrieve session ID
public
get_id() : string
Return values
string —Session ID
init()
public
init() : mixed
Return values
mixed —set()
Set a session variable
public
set(string $key, string $value) : mixed
Parameters
- $key : string
-
Session key
- $value : string
-
Session variable
Return values
mixed —toArray()
public
toArray() : array<string|int, mixed>