Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 438 Bytes

README.md

File metadata and controls

19 lines (14 loc) · 438 Bytes

Session组件,支持File和Redis(不支持协程) Handler,可以自定义SesssionHandler

composer require next/session
$sessionHandler = new \Next\Session\Handler\FileHandler();

$session = new \Next\Session\Session($sessionHandler);

$session->start(null); // 如果为null则创建id
$session->set('foo', 'bar');
$session->get('foo');
$session->save();
$session->close();

$sessionId = $session->getId();