This object is the session db handler

uses implements the singleton pattern
uses the database link
uses the exceptions handler
package OWR
used_by \OWR\REST\Controller
used_by \OWR\Controller

 Methods

Cloning is denied This function can NOT be overloaded

__clone() 
Inherited
access public
author Pierre-Alain Mignot
inherited_from \OWR\Singleton::__clone()

Executed when an object is unserialized We register the new object

__wakeUp() 
Inherited
access public
author Pierre-Alain Mignot
inherited_from \OWR\Singleton::__wakeUp()

Session cleaning handler

_clean(int $max) 
access public
author Pierre-Alain Mignot

Parameters

$max

int

the max time that session can be inactive

Session closing handler

_close() 
access public
author Pierre-Alain Mignot

Session deleting handler

_destroy(string $id) 
access public
author Pierre-Alain Mignot

Parameters

$id

string

the id of the session to delete

Session opening handler

_open() 
access public
author Pierre-Alain Mignot

Session reading handler

_read(string $id) : mixed
access public
author Pierre-Alain Mignot

Parameters

$id

string

the id of the session to retrieve

Returns

mixedthe datas or ''

Session writing handler

_write(string $id, string $data) 
access public
author Pierre-Alain Mignot

Parameters

$id

string

the id of the session to store

$data

string

serialized datas to store to the session

Session getter

get(string $var) : mixed
Static
access public
static
author Pierre-Alain Mignot

Parameters

$var

string

the name of the var to get

Returns

mixedthe value if exists, or null

Instance getter This function can NOT be overloaded

iGet() : mixed
InheritedStatic
access public
static
author Pierre-Alain Mignot
inherited_from \OWR\Singleton::iGet()

Returns

mixedthe instance

Inits the session

init(array $args) 
author Pierre-Alain Mignot
access public

Parameters

$args

array

optionnals arguments

Session ID regenerator

regenerateSessionId(boolean $isLogged) 
access public
author Pierre-Alain Mignot

Parameters

$isLogged

boolean

must-we delete previous session ?

Register function This function is called when an object is unserialized and is used to register the instance of the object This function can NOT be overloaded

register(mixed $instance) 
InheritedStatic
access public
static
author Pierre-Alain Mignot
inherited_from \OWR\Singleton::register()

Parameters

$instance

mixed

the instance to register

Session setter

set(string $var, mixed $value) : mixed
Static
access public
static
author Pierre-Alain Mignot

Parameters

$var

string

the name of the var to set

$value

mixed

the value to assign to $var

Returns

mixedthe value on success, or false

Constructor

__construct() 
Inherited
access protected
inherited_from \OWR\Singleton::__construct()

 Properties

 

the DB instance

$_db : mixed
access private
 

store instancied objects

$_instances : array
Inherited
access private
static
inherited_from \OWR\Singleton::$$_instances