Session 0.2.2

A simple session manager based on Chernozem.


Pick up the source or install it with Composer :

composer require pyrsmk/session

If you're not installing it with Composer, don't forget to load its dependencies too : Chernozem.

Managing session variables

As mentioned above, this library is based on Chernozem. Therefore, its use is pretty simple :

// Create the session object
$session = new Session();
// Define a session variable
$session['user_id'] = $user_id;
// Print a previously defined session variable
echo $session['user_id'];
// Remove a variable

If needed, you can add a namespace to your session by specifying it at instantiation :

$session = new Session('my_namespace');


Session is released under the MIT license.