for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* SessionStorage.php
*
* @copyright More in license.md
* @license https://www.ipublikuj.eu
* @author Adam Kadlec <[email protected]>
* @package iPublikuj:ConfirmationDialog!
* @subpackage Storage
* @since 1.0.0
* @date 08.06.14
*/
declare(strict_types = 1);
namespace IPub\ConfirmationDialog\Storage;
use Nette;
use Nette\Http;
* Confirmer session status storage
final class Session implements IStorage
{
* Implement nette smart magic
use Nette\SmartObject;
* @var Http\SessionSection
private $session;
* @param Http\Session $session
public function __construct(Http\Session $session)
$this->session = $session->getSection('ipub.confirmation-dialog');
}
* {@inheritdoc}
public function set(string $key, $value) : void
$this->session->$key = $value;
public function get(string $key, $default = FALSE)
return isset($this->session->$key) ? $this->session->$key : $default;
public function clear(string $key) : void
unset($this->session->$key);
public function clearAll() : void
$this->session->remove();