aesonus/session-storage

Allows for access to session superglobal with a fluent interface

v3.0 2019-02-23 19:00 UTC

This package is auto-updated.

Last update: 2024-03-24 06:48:43 UTC


README

Build Status

Session Storage

Allows for access to session superglobal with a fluent interface

Installation

composer require aesonus/session-storage

Usage

Instantiate a new instance:

$session = new Session();

Set the key before setting, getting, or clearing data:

$session->setKey('foo')->set('bar');

Set, get, or clear multiple keys' values using the fluent interface:

$value = $session
    ->setKey(0)->set('foo')
    ->setKey(1)->set('bar')
    ->setKey('clearme')->clear();
    ->setKey('getme')->get();

Refer to PHP Docs and tests for more information.

Tests

Require dev dependencies then run the following:

./vendor/bin/phpunit