cyrill/sucre-session
Composer 安装命令:
composer require cyrill/sucre-session
包简介
README 文档
README
Sucre/Session is simple loosely-coupled PHP $_SESSION wrapper.
Requirement
- PHP 5.4 or later
Installation
Download the composer.phar.
$ curl -s http://getcomposer.org/installer | php
Run Composer: php composer.phar require "cyrill/sucre-session"
Usage
<?php reqire __DIR__.'/composer/autoload.php'; use Sucre\Session; Session::init($regenerate = true); // start session Session::set('foo', 'bar'); // $_SESSION['foo'] = 'bar'; Session::get('foo'); // returns 'bar' Session::setFlash('foofoo', 'barbar'); Session::getFlash('foofoo'); // returns 'barbar' Session::generateId(); Session::destroy();
How to test?
Sucre\Session is tested by PHPUnit.
Run composer composer install --dev.
All you have to do is to run phpunit.
License
The MIT License
统计信息
- 总下载量: 100
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-06-15