Handler for a session
Methods | ||||||
---|---|---|---|---|---|---|
public
|
__construct(XoopsDatabase $db)
Constructor
Constructor Parameters
|
# | ||||
public
|
open(string $savePath, string $sessionName): bool
Open a session
Open a session |
# | ||||
public
|
close(): bool
Close a session
Close a session |
# | ||||
public
|
read(string $sessionId): string
Read a session from the database
Read a session from the database Parameters
ReturnsSession data |
# | ||||
public
|
write(string $sessionId, string $data): bool
Write a session to the database
Write a session to the database |
# | ||||
public
|
destroy(string $sessionId): bool
Destroy a session
Destroy a session |
# | ||||
public
|
gc(int $expire): bool
Garbage Collector
Garbage Collector Parameters
|
# | ||||
public
|
gc_force()
Force gc for situations where gc is registered but not executed
Force gc for situations where gc is registered but not executed |
# | ||||
public
|
regenerate_id(bool $delete_old_session = false): bool
Update the current session id with a newly generated one
Update the current session id with a newly generated one To be refactored |
# | ||||
public
|
update_cookie(string $sess_id = null, int $expire = null): bool
Update cookie status for current session
Update cookie status for current session To be refactored FIXME: how about $xoopsConfig['use_ssl'] is enabled? Parameters
|
# |
Properties | |||
---|---|---|---|
public
|
object
|
$db
|
# |
public
|
int
|
$securityLevel = 3
|
# |
protected
|
|
$bitMasks = [2 => ['v4' => 16, 'v6' => 64], 3 => ['v4' => 24, 'v6' => 56], 4 => ['v4' => 32, 'v6' => 128]]
|
# |
public
|
bool
|
$enableRegenerateId = true
|
# |