Class to improve handling of PHP sessions

package miniMVC
subpackage Libraries

 Methods

Magic function called when cloning an object

__clone() 

Retreive a session value

__get(string $key) : mixed

Parameters

$key

string

Returns

mixed

Set a session value

__set(string $key, mixed $val) : void

Parameters

$key

string

$val

mixed

Destroy a session

destroy() : void

Singleton getter function

get_instance() : \miniMVC\self

Returns

\miniMVC\self

Start a session

__construct() 

 Properties

 

Reference to current instance

$instance : \miniMVC\Session

 

Reference to session superglobal

$sess : array