aesonus / session-storage
Allows for access to session superglobal with a fluent interface
Installs: 101
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/aesonus/session-storage
Requires
- php: ^7.2
Requires (Dev)
- aesonus/test-lib: ^3.0
This package is auto-updated.
Last update: 2024-10-24 08:05:54 UTC
README
Session Storage
Allows for access to session superglobal with a fluent interface
Installation
composer require aesonus/session-storage
Usage
Instantiate a new instance:
$session = new Session();
Set the key before setting, getting, or clearing data:
$session->setKey('foo')->set('bar');
Set, get, or clear multiple keys' values using the fluent interface:
$value = $session ->setKey(0)->set('foo') ->setKey(1)->set('bar') ->setKey('clearme')->clear(); ->setKey('getme')->get();
Refer to PHP Docs and tests for more information.
Tests
Require dev dependencies then run the following:
./vendor/bin/phpunit