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
Executed when an object is unserialized
We register the new object
__wakeUp()
Inherited
Session cleaning handler
_clean(int $max)
Parameters
$max
int
the max time that session can be inactive
Session closing handler
_close()
Session deleting handler
_destroy(string $id)
Parameters
$id
string
the id of the session to delete
Session opening handler
_open()
Session reading handler
_read(string $id) : mixed
Parameters
$id
string
the id of the session to retrieve
Returns
mixed
the datas or ''
Session writing handler
_write(string $id, string $data)
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
Parameters
$var
string
the name of the var to get
Returns
mixed
the value if exists, or null
Instance getter
This function can NOT be overloaded
iGet() : mixed
InheritedStatic
Returns
mixed
the instance
Inits the session
init(array $args)
Parameters
$args
array
optionnals arguments
Session ID regenerator
regenerateSessionId(boolean $isLogged)
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
Parameters
$instance
mixed
the instance to register
Session setter
set(string $var, mixed $value) : mixed
Static
Parameters
$var
string
the name of the var to set
$value
mixed
the value to assign to $var
Returns
mixed
the value on success, or false
Constructor
__construct()
Inherited
access |
protected |
inherited_from |
\OWR\Singleton::__construct() |
Properties
the DB instance
$_db : mixed
store instancied objects
$_instances : array
Inherited
access |
private |
static |
|
inherited_from |
\OWR\Singleton::$$_instances |