jlaso/session-storage-bundle
Composer 安装命令:
composer require jlaso/session-storage-bundle
包简介
Layer to create table for PDOSessionHandler
README 文档
README
======== Overview
This bundle creates the table needed for the PDOSessionHandler
In order to install this bundle you need to pay attention with requirements:
php > 5.3.7
Installation
Checkout a copy of the code:
// in composer.json
"require": {
// ...
"jlaso/session-storage-bundle": "*"
// ...
},
Then register the bundle with your kernel:
// in AppKernel::registerBundles()
$bundles = array(
// ...
new JLaso\SessionStorageBundle\SessionStorageBundle(),
// ...
);
Configuration
// in app/config/config.yml
services:
pdo:
class: PDO
arguments:
- "mysql:host=%database_host%;port=%database_port%;dbname=%database_name%"
- "%database_user%"
- "%database_password%"
calls:
- [setAttribute, [3, 2]] # \PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION
session.handler.pdo:
class: Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler
arguments: ["@pdo", "%pdo.db_options%"]
Usage
execute schema:update to create into database the session table:
app/console doctrine:schema:update --force
统计信息
- 总下载量: 49
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-02-24