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) |
||
97 | |||
98 | /** |
||
99 | * {@inheritdoc} |
||
100 | * @codeCoverageIgnore |
||
101 | */ |
||
102 | public function destroy($sessionId) |
||
108 | |||
109 | /** |
||
110 | * {@inheritdoc} |
||
111 | * @codeCoverageIgnore |
||
112 | */ |
||
113 | public function gc($maxlifetime) |
||
117 | |||
118 | /** |
||
119 | * Return a Stash Pool instance. |
||
120 | * |
||
121 | * @return \Stash\Pool |
||
122 | */ |
||
123 | 6 | public function getPool() |
|
127 | |||
128 | /** |
||
129 | * Return a Stash Pool item |
||
130 | * |
||
131 | * @param string $sessionId The sessionid |
||
132 | * |
||
133 | * @return \Stash\Item |
||
134 | * |
||
135 | * @codeCoverageIgnore |
||
136 | */ |
||
137 | private function getItem($sessionId) |
||
141 | } |
||
142 |