This package helps you to manage your session easily.
72
0
2
Package Data
Maintainer Username: IftekherSunny
Maintainer Contact: iftekhersunny@hotmail.com (Iftekher Sunny)
Package Create Date: 2015-07-13
Package Last Update: 2015-07-25
Home Page: https://packagist.org/packages/sun/session
Language: PHP
License: MIT
Last Refreshed: 2024-12-26 15:03:33
Package Statistics
Total Downloads: 72
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

Session

Total Downloads Latest Stable Version Latest Unstable Version License

Session helps you to manage your session data easily.

Installation Process

Just copy Session folder somewhere into your project directory. Then include session autoloader.

 require_once('/path/to/Session/autoload.php');

Session is also available via Composer/Packagist.

 composer require sun/session

All Methods

To store session data
$session = new Sun\Session;
$session->create('login', 'username');
To get session data
$session->get('login');

You can also set default value for session get method.

$session->get('login', 'users');
To delete session data
$session->get('login');
To check session exists
$session->has('login');
To pull session data

The pull method retrieve session data then delete this session immediately.

$session->pull('login');

You can also set default value for session pull method.

$session->pull('login','users');
To push session data into session array
$session->push('login', ['user']);
To pop session data from session array
$session->pop('login');
To shift session data from session array
$session->shift('login');
To destroy all session data
$session->destroy();

License

This package is licensed under the MIT License