sframe / session
session component
dev-master
2014-12-11 13:50 UTC
Requires
- php: >=5.3.0
- sframe/memcache: dev-master
- sframe/redis: dev-master
This package is not auto-updated.
Last update: 2024-12-31 04:33:39 UTC
README
Simple session component
Installation
composer require "sframe/session:dev-master"
#Options Same as original php session options See: http://php.net/manual/en/session.configuration.php
Usage
use \SFrame\Session\Session; Session::start(); $_SESSION['test'] = 'hello'; $session_id = Session::getId(); Session::destroy();
Use redis storage
$options = array(); $redis = new \SFrame\Redis\Redis(); Session::start($options, 'redis', $redis);
Use memcache storage
$options = array(); $memcache = new \SFrame\Memcache\Memcache(); Session::start($options, 'memcache', $memcache);