Permalink
Cannot retrieve contributors at this time
Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign up
Fetching contributors…

<?php | |
namespace Equip; | |
use Equip\Tools\ArrayProxyTrait; | |
class NativeSession implements SessionInterface | |
{ | |
use ArrayProxyTrait; | |
/** | |
* @inheritDoc | |
*/ | |
public function has($key) | |
{ | |
return !empty($_SESSION[$key]); | |
} | |
/** | |
* @inheritDoc | |
*/ | |
public function get($key, $default = null) | |
{ | |
return $this->has($key) ? $_SESSION[$key] : $default; | |
} | |
/** | |
* @inheritDoc | |
*/ | |
public function set($key, $value) | |
{ | |
$_SESSION[$key] = $value; | |
} | |
/** | |
* @inheritDoc | |
*/ | |
public function del($key) | |
{ | |
unset($_SESSION[$key]); | |
} | |
/** | |
* @inheritDoc | |
*/ | |
public function clear() | |
{ | |
$_SESSION = []; | |
} | |
} |