2017 © Pedro Peláez
 

library php-cookie-session

Session save handler used to store the session in a cookie

image

locosoftworks/php-cookie-session

Session save handler used to store the session in a cookie

  • Thursday, May 19, 2016
  • by moranjk
  • Repository
  • 1 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Cookie Session Handler

Requires

  • PHP >= 5.3

Composer Install

"minimum-stability": "dev",
"require": {
    "locosoftworks/php-cookie-session": "dev-master"
}

Usage

$handler = new Loco\Session\SaveHandler\ClientSession();

It is recommended that you encrypt the session. Create a class that implements Loco\Crypt\CipherInterface and inject it into the session handler, (*1)

$handler->setCipher($myEncryptionClass);

Set the session save handler using session_set_save_handler() (see php documentation), (*2)

session_set_save_handler(
    array($handler, 'open'),
    array($handler, 'close'),
    array($handler, 'read'),
    array($handler, 'write'),
    array($handler, 'destroy'),
    array($handler, 'gc')
);

session_start();

You MUST call session_write_close BEFORE returning any output. Output Buffering is recommended., (*3)

The Versions

19/05 2016

dev-develop

dev-develop

Session save handler used to store the session in a cookie

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by James Moran

10/07 2014

dev-master

9999999-dev

Session save handler used to store the session in a cookie

  Sources   Download

MIT

The Requires

  • php >=5.3

 

by James Moran