userfrosting/session
最新稳定版本:4.5.0
Composer 安装命令:
composer require userfrosting/session
包简介
Uniform interface for storing sessions in a variety of mediums, based on illuminate/session
关键字:
README 文档
README
| Branch | Build | Coverage | Style |
|---|---|---|---|
| master | |||
| develop | |
Example usage:
use Illuminate\Filesystem\Filesystem;
use Illuminate\Session\FileSessionHandler;
use UserFrosting\Session\Session;
// Use custom filesystem sessions
$fs = new FileSystem;
$handler = new FileSessionHandler($fs, \UserFrosting\APP_DIR . "/sessions");
// Creates a new wrapper for $_SESSION
$session = new Session($handler, $config['session']);
// Starts the session
$session->start();
// Set some values
$session['contacts.housekeeper.name']; = 'Alex "the man" Weissman';
// They're stored in array format...
print_r($session->all());
// Output is:
/*
[
'contacts' => [
'housekeeper' => [
'name' => 'Alex "the man" Weissman'
]
]
];
*/
// Destroy the session, both in memory and on the persistence layer, and tell the browser to remove the cookie
$session->destroy();
Style Guide
Testing
统计信息
- 总下载量: 47.55k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-06-04