dev-master
9999999-devHUMBLE Session
MIT
The Requires
- php >=7.0.0
- humble/standards ~1.0
The Development Requires
Wallogit.com
2017 © Pedro Peláez
HUMBLE Session
HUMBLE Session, (*2)
Via Composer, (*3)
``` bash $ composer require humble/session, (*4)
## Usage Start PHP Session.
\Humble\Session\Session::start();, (*5)
Start PHP Session with custom cookie params.
\Humble\Session\Session::start(array('lifetime' => 3600));, (*6)
Create table for Pdo Session.
CREATE TABLE sessions (
id char(26) NOT NULL,
time int(10) unsigned NOT NULL,
data text NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;, (*7)
Start Pdo Session.
$handler = new \Humble\Session\PdoSessionHandler($pdo); \Humble\Session\Session::start(array('lifetime' => 3600), $handler);, (*8)
Get Pdo Session Handler with custom settings.
$handler = new \Humble\Session\PdoSessionHandler($pdo, [ 'tableName' => 'sessions', 'idField' => 'id', 'timeField' => 'time', 'dataField' => 'data', ]); ```, (*9)
The MIT License (MIT). Please see License File for more information., (*10)
HUMBLE Session
MIT