2017 © Pedro Peláez
 

library session

A session abstraction library

image

bistro/session

A session abstraction library

  • Wednesday, February 20, 2013
  • by davewid
  • Repository
  • 1 Watchers
  • 4 Stars
  • 70 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Bistro: Session

A Session library for PHP 5.3+. Allows different storage engines to be used., (*1)

Engines

2 Storage engines are included in the library., (*2)

Native

This driver uses the php native $_SESSION array to handle the session data., (*3)

``` php $session = new \Bistro\Session\Native;, (*4)

$timeout = $session->get('timeout');, (*5)

if ($timeout === null) { $session->set('timeout', time() + 43200); }, (*6)

### MockArray

There is also a MockArray storage engine to help with unit testing session data.
The MockArray session doesn't save state across "requests".

``` php
$data = array(
    'test' => "Session data",
    'goes' => "Here"
)

$session = new \Bistro\Session\MockArray($data);

$session->has('test'); // true
$missing = $session->get('missing'); // null

Storage Interface

Check \Bistro\Session\Session for all of the public methods that are available to a session storage engine., (*7)

The Versions

20/02 2013

dev-master

9999999-dev

A session abstraction library

  Sources   Download

MIT

The Requires

 

session bistro

20/02 2013

0.1.0

0.1.0.0

A session abstraction library

  Sources   Download

MIT

The Requires

 

session bistro