\session

Class session

Summary

Methods
Properties
Constants
__construct()
open()
read()
write()
destroy()
gc()
close()
__destruct()
getTimeout()
No public properties found
No constants found
No protected methods found
$session_cache_expire_minutes
N/A
decrypt()
encrypt()
$pdo
$password
N/A

Properties

$session_cache_expire_minutes

$session_cache_expire_minutes : integer

Type

integer — Session cache expiry time. This is in minutes.

$pdo

$pdo : object

Type

object — PDO object

$password

$password : string

Type

string

Methods

__construct()

__construct(string  $name = 'ncsys-session', boolean  $start = true) 

DbSessionHandler constructor.

Parameters

string $name
boolean $start

open()

open() : boolean

Initialize session

Returns

boolean

read()

read(string  $id) : string

Read session data

Parameters

string $id

Session id

Returns

string —

Session data if available, empty string if not.

write()

write(string  $id, string  $data) : mixed

Write session data

Parameters

string $id

Session id

string $data

Session data to be written

Returns

mixed

destroy()

destroy(string  $id) : mixed

Destroy a session

Parameters

string $id

Session id

Returns

mixed

gc()

gc(string  $maxlifetime) : mixed

Cleanup old sessions Garbage collection.

Parameters

string $maxlifetime

Sessions that have not updated for the last maxlifetime seconds will be removed.

Returns

mixed —

The return value (usually TRUE on success, FALSE on failure).

close()

close() : boolean

Close the session

Returns

boolean

__destruct()

__destruct() 

getTimeout()

getTimeout() : integer

Returns

integer —

the number of seconds after which data will be seen as 'garbage' and cleaned up, defaults to 1440 seconds.

decrypt()

decrypt(  $edata) : string

Decrypt AES 256

Parameters

$edata

Returns

string

encrypt()

encrypt(  $data) : string

Crypt AES 256

Parameters

$data

Returns

string