2017 © Pedro Peláez
 

library session

PHP session made easy with Packfire Session library.

image

packfire/session

PHP session made easy with Packfire Session library.

  • Thursday, February 6, 2014
  • by mauris
  • Repository
  • 1 Watchers
  • 5 Stars
  • 447 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Packfire Session

PHP session made easy with Packfire Session library., (*1)

Packfire Session aims to abstract and improve the behaviour of PHP Session for out-of-the-box usage with improved security., (*2)

Installation

Use Composer to include Packfire Session in your project., (*3)

{
    "require": {
        "packfire/session": "1.0.*"
    }
}

Run Composer to install Packfire Session for use with your project., (*4)

$ composer install

Usage

The Session class is the main class we can work the session from., (*5)

To initiate a session:, (*6)

<?php
use Packfire\Session\Session;
use Packfire\Session\Storage\SessionStorage;

$session = new Session(new SessionStorage());
if (!Session::detectCookie()) { // only register session if cookie is not found.
    Session::register(); // session_start();
}

To regenerate a new Session ID (recommended when users sign in / out to improve security):, (*7)

$session->regenerate();

Invalidate a session (session is kept registered, but all values are cleared, session ID is regenerated):, (*8)

$session->invalidate();

Destroy a session (session ID is removed entirely):, (*9)

Session::unregister();

Session Buckets are great way to scope down your session variables. To get started working with session buckets:, (*10)

$bucket = $session->bucket('form');
$bucket->set('txtName', $_POST['txtName']);

The Versions

06/02 2014

dev-master

9999999-dev http://mauris.sg/packfire

PHP session made easy with Packfire Session library.

  Sources   Download

BSD-3-Clause

The Requires

 

06/02 2014

1.2.0

1.2.0.0 http://mauris.sg/packfire

PHP session made easy with Packfire Session library.

  Sources   Download

BSD-3-Clause

The Requires

 

15/10 2013

1.1.0

1.1.0.0 http://mauris.sg/packfire

PHP session made easy with Packfire Session library.

  Sources   Download

BSD-3-Clause

The Requires

 

27/09 2013

1.0.1

1.0.1.0 http://mauris.sg/packfire

PHP session made easy with Packfire Session library.

  Sources   Download

BSD-3-Clause

The Requires