2017 © Pedro Peláez
 

bundle session-storage-bundle

Layer to create table for PDOSessionHandler

image

jlaso/session-storage-bundle

Layer to create table for PDOSessionHandler

  • Wednesday, March 25, 2015
  • by jlaso
  • Repository
  • 1 Watchers
  • 1 Stars
  • 26 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

========, (*2)

Overview

This bundle creates the table needed for the PDOSessionHandler, (*3)

In order to install this bundle you need to pay attention with requirements:, (*4)

php > 5.3.7

Installation

Checkout a copy of the code:, (*5)

// in composer.json
"require": {
    // ...
    "jlaso/session-storage-bundle": "*"
    // ...
},

Then register the bundle with your kernel:, (*6)

// 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:, (*7)

app/console doctrine:schema:update --force 

The Versions

25/03 2015

dev-master

9999999-dev https://github.com/jlaso/session-storage-bundle

Layer to create table for PDOSessionHandler

  Sources   Download

MIT

The Requires

  • php >=5.3.7

 

symfony session