2017 © Pedro Peláez
 

library session-handler

Psr-15 middleware allowing to set a custom session handler

image

ellipse/session-handler

Psr-15 middleware allowing to set a custom session handler

  • Friday, February 23, 2018
  • by pmall
  • Repository
  • 1 Watchers
  • 0 Stars
  • 67 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Session handler

This package provides a Psr-15 middleware allowing to set a custom session handler to your application., (*1)

Require php >= 7.0, (*2)

Installation composer require ellipse/session-handler, (*3)

Run tests ./vendor/bin/kahlan, (*4)

Using the set session handler middleware

For example, a custom session handler using an implementation of Psr-6 can be used instead of the built in session handler:, (*5)

<?php

namespace App;

use Cache\Adapter\Predis\PredisCachePool;
use Cache\SessionHandler\Psr6SessionHandler;

use Ellipse\Session\SetSessionHandlerMiddleware;

// Get an implementation of php SessionHandlerInterface. Here a session handler
// managing data with redis is used.
$client = new \Predis\Client(...);

$pool = PredisCachePool($client);

$config = ['ttl'=>3600, 'prefix'=>'foobar'];

$handler = new Psr6SessionHandler($pool, $config);

// This middleware will set $handler as the session handler. Obviously it should
// be processed before any call to session_start().
$middleware = new SetSessionHandlerMiddleware($handler);

The Versions

23/02 2018

dev-master

9999999-dev https://github.com/ellipsephp/session-handler

Psr-15 middleware allowing to set a custom session handler

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar pmall

middleware session handler psr-15 session-handler

23/02 2018

1.0.2

1.0.2.0 https://github.com/ellipsephp/session-handler

Psr-15 middleware allowing to set a custom session handler

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar pmall

middleware session handler psr-15 session-handler

23/01 2018

1.0.1

1.0.1.0 https://github.com/ellipsephp/session-handler

Psr-15 middleware allowing to set a custom session handler

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar pmall

middleware session handler psr-15 session-handler

18/11 2017

1.0.0

1.0.0.0 https://github.com/ellipsephp/session-handler

Psr-15 middleware allowing to set a custom session handler

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar pmall

middleware session handler psr-15 session-handler