pyrsmk/session
最新稳定版本:0.2.2
Composer 安装命令:
composer require pyrsmk/session
包简介
A simple session manager
关键字:
README 文档
README
A simple session manager based on Chernozem.
Install
Pick up the source or install it with Composer :
composer require pyrsmk/session
If you're not installing it with Composer, don't forget to load its dependencies too : Chernozem.
Managing session variables
As mentioned above, this library is based on Chernozem. Therefore, its use is pretty simple :
// Create the session object $session = new Session(); // Define a session variable $session['user_id'] = $user_id; // Print a previously defined session variable echo $session['user_id']; // Remove a variable unset($session['user_id']);
If needed, you can add a namespace to your session by specifying it at instantiation :
$session = new Session('my_namespace');
License
Session is released under the MIT license.
统计信息
- 总下载量: 177
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-01-16