-
Notifications
You must be signed in to change notification settings - Fork 126
Expand file tree
/
Copy pathSessionStorage.php
More file actions
53 lines (43 loc) · 950 Bytes
/
Copy pathSessionStorage.php
File metadata and controls
53 lines (43 loc) · 950 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
namespace Craue\FormFlowBundle\Storage;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
/**
* Stores data in the session.
*
* @author Toni Uebernickel <tuebernickel@gmail.com>
* @copyright 2011-2015 Christian Raue
* @license http://opensource.org/licenses/mit-license.php MIT License
*/
class SessionStorage implements StorageInterface {
/**
* @var SessionInterface
*/
protected $session;
public function __construct(SessionInterface $session) {
$this->session = $session;
}
/**
* {@inheritDoc}
*/
public function set($key, $value) {
$this->session->set($key, $value);
}
/**
* {@inheritDoc}
*/
public function get($key, $default = null) {
return $this->session->get($key, $default);
}
/**
* {@inheritDoc}
*/
public function has($key) {
return $this->session->has($key);
}
/**
* {@inheritDoc}
*/
public function remove($key) {
return $this->session->remove($key);
}
}