for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* SocialConnect project
* @author: Patsura Dmitry https://github.com/ovr <[email protected]>
*/
declare(strict_types=1);
namespace SocialConnect\Provider\Session;
class Session implements SessionInterface
{
public function __construct()
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
* @param string $key
*
* @return mixed
public function get($key)
if (isset($_SESSION[$key])) {
return $_SESSION[$key];
return null;
* @param mixed $value
public function set($key, $value)
$_SESSION[$key] = $value;
public function delete($key)
unset($_SESSION[$key]);