library session
Session handler
lune/session
Session handler
- Sunday, February 26, 2017
- by studiowbe
- Repository
- 1 Watchers
- 0 Stars
- 36 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 5 Versions
- 0 % Grown
Lune\Session
Basic session management, (*1)
Installation
Session is available on Composer, (*2)
composer require lune/session
Usage example
//create a new Manager
$sessions = new \Lune\Session\Manager();
//add a value to the session
$sessions->get('my-session')->set('foo', 'bar');
//add multiple values to the session
$sessions->get('my-session')->set(['foo2' => 'bar2']);
//retrieve a value from the session
$v = $sessions->get('my-session')->get('foo'); // returns 'bar'
//use a default value if the key does not exist
$v = $sessions->get('my-session')->get('foo3', 'bar3'); // returns 'bar3'
//check if a key is defined in the session
$sessions->get('my-session')->has('foo'); // returns true
//clear a value
$sessions->get('my-session')->remove('foo');
//clear multiple values
$sessions->get('my-session')->remove(['foo', 'foo2']);
//clear all values for a specific session
$sessions->get('my-session')->clear();
dev-master
9999999-dev
Session handler
Sources
Download
MIT
The Requires
The Development Requires
v0.1.3
0.1.3.0
Session handler
Sources
Download
MIT
The Requires
The Development Requires
v0.1.2
0.1.2.0
Session handler
Sources
Download
MIT
The Requires
The Development Requires
v0.1.1
0.1.1.0
Session handler
Sources
Download
MIT
The Requires
The Development Requires
v0.1.0
0.1.0.0
Session handler
Sources
Download
MIT
The Requires
The Development Requires