2017 © Pedro Peláez
 

library rock-session

A simple Session library for PHP

image

romeoz/rock-session

A simple Session library for PHP

  • Monday, November 9, 2015
  • by romeOz
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,246 Installations
  • PHP
  • 5 Dependents
  • 3 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

Session library for PHP

Latest Stable Version Total Downloads Build Status HHVM Status Coverage Status License, (*1)

Handlers

Installation

From the Command Line:, (*2)

composer require romeoz/rock-session

or in your composer.json:, (*3)

{
 "require": {
     "romeoz/rock-session": "*"
 }
}

Quick Start

Session as key-value memory storage

$config = [
    'cache' => new \rock\cache\Memcached
];
$session = new \rock\session\MemorySession($config);
$session->add('name', 'Tom');

echo $session->get('name'); // result: Tom

Session as MongoDB storage

$config = [
    'connection' => new \rock\mongodb\Connection
];
$session = new \rock\session\MongoSession($config);
$session->add('name', 'Tom');

echo $session->get('name'); // result: Tom

Default is used the garbage collector (GC). You can use TTL indexes., (*4)

$connection = new \rock\mongodb\Connection;

// Create TTL index
$connection
    ->getCollection('session')
    ->createIndex('expire', ['expireAfterSeconds' => 0]);

$config = [
    'connection' => $connection,
    'useGC' => false
];
$session = new \rock\session\MongoSession($config);
$session->add('name', 'Tom');

echo $session->get('name'); // result: Tom

Requirements

  • PHP 5.4+
  • For MemorySession required Rock Cache: composer require romeoz/rock-cache
  • For MongoSession required Rock MongoDB: composer require romeoz/rock-mongodb
  • For DbSession required Rock DB: composer require romeoz/rock-db

All unbolded dependencies is optional., (*5)

License

Session library is open-sourced software licensed under the MIT license., (*6)

The Versions

09/11 2015

dev-master

9999999-dev

A simple Session library for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ruslan

mongodb postgres redis memcached mysql session memory

09/11 2015

0.12.0

0.12.0.0

A simple Session library for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ruslan

mongodb postgres redis memcached mysql session memory

18/10 2015

0.11.0

0.11.0.0

A simple Session library for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ruslan

mongodb postgres redis memcached mysql session memory

11/07 2015

0.10.4

0.10.4.0

Session module for Rock Framework

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ruslan

session

03/07 2015

0.10.3

0.10.3.0

Session module for Rock Framework

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ruslan

session

21/06 2015

0.10.2

0.10.2.0

Session module for Rock Framework

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ruslan

session

29/05 2015

0.10.1

0.10.1.0

Session module for Rock Framework

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ruslan

session

05/03 2015

0.10.0

0.10.0.0

Session module for Rock Framework

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ruslan

session