Session
in package
implements
SessionHandlerInterface
Table of Contents
Interfaces
- SessionHandlerInterface
Properties
- $db : MySql
- $encryption : Encryption
- $options : array<string|int, mixed>
- Session settings
- $regenerate_after : int
- $started : bool
Methods
- __construct() : mixed
- close() : bool
- destroy() : bool
- gc() : int|false
- get() : mixed
- open() : bool
- read() : string|false
- regenerate() : bool
- set() : void
- start() : bool
- write() : bool
Properties
$db
private
MySql
$db
$encryption
private
Encryption
$encryption
$options
Session settings
private
array<string|int, mixed>
$options
= ['name' => 'w', 'referer_check' => '', 'use_cookies' => 1, 'use_only_cookies' => 1, 'use_trans_sid' => 0, 'use_strict_mode' => 1, 'cookie_lifetime' => 0, 'cookie_path' => '/', 'cookie_domain' => '', 'cookie_secure' => false, 'cookie_httponly' => true, 'save_path' => '', 'gc_probability' => 1, 'gc_divisor' => 1000, 'gc_maxlifetime' => 14400]
$regenerate_after
private
int
$regenerate_after
= 600
$started
private
bool
$started
= false
Methods
__construct()
public
__construct(MySql $db, Encryption $encryption) : mixed
Parameters
- $db : MySql
- $encryption : Encryption
close()
public
close() : bool
Return values
booldestroy()
public
destroy(string $id) : bool
Parameters
- $id : string
Return values
boolgc()
public
gc(int $maxLifetime) : int|false
Parameters
- $maxLifetime : int
Return values
int|falseget()
public
get([string|null $key = null ]) : mixed
Parameters
- $key : string|null = null
open()
public
open(string $savePath, string $sessionName) : bool
Parameters
- $savePath : string
- $sessionName : string
Return values
boolread()
public
read(string $id) : string|false
Parameters
- $id : string
Return values
string|falseregenerate()
public
regenerate([bool $destroy = false ]) : bool
Parameters
- $destroy : bool = false
Return values
boolset()
public
set(string $key, mixed $value) : void
Parameters
- $key : string
- $value : mixed
start()
public
start() : bool
Return values
boolwrite()
public
write(string $id, string $data) : bool
Parameters
- $id : string
- $data : string