1 | <?php |
||
26 | class StashSessionHandler implements \SessionHandlerInterface |
||
27 | { |
||
28 | /** |
||
29 | * @var \Stash\Pool Stash pool. |
||
30 | */ |
||
31 | private $pool; |
||
32 | |||
33 | /** |
||
34 | * @var int Time to live in seconds |
||
35 | */ |
||
36 | private $ttl; |
||
37 | |||
38 | /** |
||
39 | * @var string Key prefix for shared environments. |
||
40 | */ |
||
41 | private $prefix; |
||
42 | |||
43 | /** |
||
44 | * Constructor |
||
45 | * |
||
46 | * @param \Stash\Pool $pool A \Stash\Pool instance |
||
47 | * @param array $options An associative array of Stash options |
||
48 | */ |
||
49 | 12 | public function __construct(\Stash\Pool $pool, array $options = array()) |
|
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | * @codeCoverageIgnore |
||
59 | */ |
||
60 | public function open($savePath, $sessionName) |
||
64 | |||
65 | /** |
||
66 | * {@inheritdoc} |
||
67 | * @codeCoverageIgnore |
||
68 | */ |
||
69 | public function close() |
||
73 | |||
74 | /** |
||
75 | * {@inheritdoc} |
||
76 | * @codeCoverageIgnore |
||
77 | */ |
||
78 | public function read($sessionId) |
||
85 | |||
86 | /** |
||
87 | * {@inheritdoc} |
||
88 | * @codeCoverageIgnore |
||
89 | */ |
||
90 | public function write($sessionId, $data) |
||
99 | |||
100 | /** |
||
101 | * {@inheritdoc} |
||
102 | * @codeCoverageIgnore |
||
103 | */ |
||
104 | public function destroy($sessionId) |
||
110 | |||
111 | /** |
||
112 | * {@inheritdoc} |
||
113 | * @codeCoverageIgnore |
||
114 | */ |
||
115 | public function gc($maxlifetime) |
||
119 | |||
120 | /** |
||
121 | * Return a Stash Pool instance. |
||
122 | * |
||
123 | * @return \Stash\Pool |
||
124 | */ |
||
125 | 6 | public function getPool() |
|
126 | { |
||
127 | 6 | return $this->pool; |
|
128 | } |
||
129 | |||
130 | /** |
||
131 | * Return a Stash Pool item |
||
132 | * |
||
133 | * @param string $sessionId The sessionid |
||
134 | * |
||
135 | * @return \Stash\Item |
||
136 | * |
||
137 | * @codeCoverageIgnore |
||
138 | */ |
||
139 | private function getItem($sessionId) |
||
143 | } |
||
144 |