A framework agnostic session library with convenient dot notation access.
Included:
- Native php sessions
- Simple database sessions via PDO (MySQL, Postgres,...)
External handlers:
You can implement any other handler or use other already existing implementations that implement the native php SessionHandlerInterface.
This is a very simple example to give you an idea of how to use it:
use Phauthentic\Session\Session;
use Phauthentic\Session\Config as SessionConfig;
$config = (new SessionConfig())
->setSessionName('my-app')
->setGcMaxLifeTime(60);
$session = new Session($config);
$session->write('user', ['username' => 'foo']);
echo $session->read('user.username');
Licensed under the MIT license.
- Copyright (c) Florian Krämer
- Copyright (c) Cake Software Foundation, Inc.