https://github.com/fatkulnurk/session
PHP library for handling sessions
https://github.com/fatkulnurk/session
php php-composer php-library session session-management session-manager
Last synced: 5 months ago
JSON representation
PHP library for handling sessions
- Host: GitHub
- URL: https://github.com/fatkulnurk/session
- Owner: fatkulnurk
- Created: 2020-01-12T16:45:22.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-26T20:02:41.000Z (about 6 years ago)
- Last Synced: 2026-01-14T13:55:45.953Z (5 months ago)
- Topics: php, php-composer, php-library, session, session-management, session-manager
- Language: PHP
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PHP SESSION
---
PHP library for handling sessions
### Install
See in packagist
````
https://packagist.org/packages/fatkulnurk/session
````
with composer
```
composer require fatkulnurk/session
```
### Under Development
- [ ] Get session with nested key
- [ ] Set session with Nested Value
### Usage
**Start session:**
```
Session::init();
```
**Start session by setting the session duration:**
Param in seconds.
```
Session::init(3600);
```
**Add value to a session:**
```
Session::set('name', 'Fatkul Nur Koirudin');
```
**Add multiple value to sessions:**
Unsupport for nested array.
```
$data = [
'name' => 'Rudi',
'gender' => 'Male',
];
Session::set($data);
```
**Extract session item, delete session item and finally return the item:**
```
Session::pull('name');
```
**Return the session array / Return all session value:**
```
Session::get();
```
**Get session id:**
```
Session::id();
```
**Destroys one key session:**
```
Session::destroy('name');
```
**Destroys all sessions:**
```
Session::destroy();
```