2017 © Pedro Peláez
 

library clisession

Use the PHP built-in session manager on CLI

image

insulinjunkiede/clisession

Use the PHP built-in session manager on CLI

  • Friday, January 20, 2017
  • by InsulinJunkieDe
  • Repository
  • 0 Watchers
  • 0 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

CLI Session Class

This library provides an command line & object-oriented version of the php standard session management. Inside the wrapper it uses the default php session_*-commands, (*1)

If you have questions or problems with installation or usage create an Issue., (*2)

Installation

In order to install this library via composer run the following command in the console:, (*3)

composer require insulinjunkiede/clisession

or add the package manually to your composer.json file in the require section:, (*4)

"insulinjunkiede/clisession": "dev-master"

Usage examples

$session = new InsulinJunkieDe\CliSession\Session('.session', __DIR__);
/*
When creating a new session, the first parameter takes the file name and the 2nd
one the directory where is file should be written to.
Both an be omitted, but it won't work, since PHP is generating a new
session_id(and filename) each time you restart your CLI script.
So the first paramater is kind of mandatory, when you want to reuse the
session-content in the next CLI-call
*/
$session->setParam('key','value');
$session->getParam('key');

The Versions

20/01 2017

dev-master

9999999-dev

Use the PHP built-in session manager on CLI

  Sources   Download

MIT

The Development Requires

  • php >=5.4.0

by Matthias Ismail

20/01 2017

v0.1

0.1.0.0

Use the PHP built-in session manager on CLI

  Sources   Download

MIT

The Development Requires

  • php >=5.4.0

by Matthias Ismail