2017 © Pedro Peláez
 

library session

Lightweight session manager library.

image

joebengalen/session

Lightweight session manager library.

  • Friday, April 10, 2015
  • by JoeBengalen
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 2 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Session

Lightweight session manager library., (*1)

Uses PHP's $_SESSION global with a namespace so no interference should happen with other libraries., (*2)

Session object should have set, get, has, remove and clear methods and implement \ArrayAccess. This is done by extending the JoeBengalen\Config\AbstractConfig class. Doing so we also get support for arrays with dot notation., (*3)

<?php

$session = new \JoeBengalen\Session\Session('unique_namespace');

$session['key1.key2'] = 'value1';
$session['key1.key3'] = 'value2';

var_dump($session->get('key1'));
// -> returns ['key2' => 'value1', 'key3' => 'value2']

var_dump($session->get());
// -> returns all session data

var_dump($session->get() === $_SESSION[$session->getNamespace()]);
// -> returns true

The Versions

10/04 2015

dev-master

9999999-dev https://github.com/JoeBengalen/Session

Lightweight session manager library.

  Sources   Download

MIT

The Requires

 

by Martijn Wennink

session