2017 © Pedro Peláez
 

library session

Module for working with PHP sessions

image

drmvc/session

Module for working with PHP sessions

  • Wednesday, April 18, 2018
  • by EvilFreelancer
  • Repository
  • 1 Watchers
  • 0 Stars
  • 51 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Latest Stable Version Build Status Total Downloads License PHP 7 ready Code Climate Scrutinizer CQ, (*1)

DrMVC\Session

Module for working with PHP sessions., (*2)

composer require drmvc/session

How to use

More examples you can find here., (*3)

<?php
require_once __DIR__ . '/../vendor/autoload.php';

use DrMVC\Session;

// Create session object, you can also set prefix
// as first argument of Session class
$session = new Session();

// Init session object
$session->init();

// Get ID of current session
$session_id = $session->id();

// Set few keys in session
$session
    ->set('text', 'value')
    ->set('integer', 123)
    ->set('boolean', true)
    ->set('array', ['mama', 'ama', 'criminal']);

// Receive variables of current session
$keys = $session->display();
var_dump($keys);

// Get some single value by key
$value = $session->get('integer');
var_dump($value);

About PHP Unit Tests

First need to install all dev dependencies via composer update, then you can run tests by hands from source directory via ./vendor/bin/phpunit command., (*4)

Links

The Versions

18/04 2018

dev-master

9999999-dev https://drmvc.com/

Module for working with PHP sessions

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

session

07/04 2018

3.0.0

3.0.0.0 https://drmvc.com/

Module for working with PHP sessions

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

session