iflamed / onesession
a session solution for mult language development
Installs: 24
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/iflamed/onesession
This package is not auto-updated.
Last update: 2025-10-11 20:21:12 UTC
README
a session solution for mult language development
StoreInterface
a store interface to connect with each cahce or database
version 1.0.0
now it is surpport the memcache session store with the memacche and memcached extension
useage
<?php
require 'vendor/autoload.php';
$cacheConfig = array(
'config'=>array(
array(
'host'=>'127.0.0.1',
'port'=>11211,
'weight'=>10,
),
),
'useMemcached'=>false,
);
$keyPrefix='localhost';
$storeClassName = 'MemcacheStore';
Onesession\HttpSession::init($storeClassName,$cacheConfig,$keyPrefix);
session_start();
$_SESSION['serialisation'] = 'should be in json';
if (!isset($_SESSION['a'])) {
$_SESSION['a'] = 0;
}
$_SESSION['a']++;
var_dump($_SESSION);
?>