for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Lug package.
*
* (c) Eric GELOEN <[email protected]>
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code.
*/
namespace Lug\Component\Storage\Model;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
/**
* @author GeLo <[email protected]>
class SessionStorage implements StorageInterface
{
* @var SessionInterface
private $session;
* @param SessionInterface $session
public function __construct(SessionInterface $session)
$this->session = $session;
}
* {@inheritdoc}
public function offsetExists($offset)
return $this->session->has($offset);
public function offsetGet($offset)
return $this->session->get($offset);
public function offsetSet($offset, $value)
$this->session->set($offset, $value);
public function offsetUnset($offset)
$this->session->remove($offset);