pyrsmk / session
This package is abandoned and no longer maintained.
No replacement package was suggested.
A simple session manager
0.2.2
2016-10-06 16:12 UTC
Requires
- php: >=5.3.0
- pyrsmk/chernozem: ^4.2
README
A simple session manager based on Chernozem.
Install
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 unset($session['user_id']);
If needed, you can add a namespace to your session by specifying it at instantiation :
$session = new Session('my_namespace');
License
Session is released under the MIT license.