https://github.com/drmvc/session
Collection of classes seestion management
https://github.com/drmvc/session
Last synced: over 1 year ago
JSON representation
Collection of classes seestion management
- Host: GitHub
- URL: https://github.com/drmvc/session
- Owner: drmvc
- License: mit
- Created: 2018-04-06T09:04:22.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-18T16:56:39.000Z (over 8 years ago)
- Last Synced: 2025-01-13T08:46:16.322Z (over 1 year ago)
- Language: PHP
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://packagist.org/packages/drmvc/session)
[](https://travis-ci.org/drmvc/session)
[](https://packagist.org/packages/drmvc/session)
[](https://packagist.org/packages/drmvc/session)
[](https://travis-ci.org/drmvc/session)
[](https://codeclimate.com/github/drmvc/session)
[](https://scrutinizer-ci.com/g/drmvc/session/)
# DrMVC\Session
Module for working with PHP sessions.
composer require drmvc/session
## How to use
More examples you can find [here](extra).
```php
init();
// Get ID of current session
$session_id = $session->id();
// Set few keys in session
$session
->set('text', 'value')
->set('integer', 123)
->set('boolean', true)
->set('array', ['mama', 'ama', 'criminal']);
// Receive variables of current session
$keys = $session->display();
var_dump($keys);
// Get some single value by key
$value = $session->get('integer');
var_dump($value);
```
## About PHP Unit Tests
First need to install all dev dependencies via `composer update`, then
you can run tests by hands from source directory via `./vendor/bin/phpunit` command.
# Links
* [DrMVC Framework](https://drmvc.com)