1 | <?php |
||
37 | class Session extends ObjectAbstract implements SessionInterface |
||
38 | { |
||
39 | use DriverAwareTrait, HandlerAwareTrait, ValidatorAwareTrait, GeneratorAwareTrait; |
||
40 | |||
41 | /** |
||
42 | * Session id |
||
43 | * |
||
44 | * @var string |
||
45 | * @access protected |
||
46 | */ |
||
47 | protected $id; |
||
48 | |||
49 | /** |
||
50 | * Session name |
||
51 | * |
||
52 | * @var string |
||
53 | * @access protected |
||
54 | */ |
||
55 | protected $name; |
||
56 | |||
57 | /** |
||
58 | * session data |
||
59 | * |
||
60 | * @var array|null |
||
61 | * @access protected |
||
62 | */ |
||
63 | protected $data; |
||
64 | |||
65 | /** |
||
66 | * Init the session |
||
67 | * |
||
68 | * @param string $sessionName session name |
||
69 | * @param SessionHandlerInterface $handler session save handler |
||
70 | * @param DriverInterface $driver communication driver |
||
71 | * @param GeneratorInterface $generator id generator |
||
72 | * @access public |
||
73 | */ |
||
74 | public function __construct( |
||
86 | |||
87 | /** |
||
88 | * Write & close |
||
89 | * |
||
90 | * @access public |
||
91 | */ |
||
92 | public function __destruct() |
||
96 | |||
97 | /** |
||
98 | * {@inheritDoc} |
||
99 | */ |
||
100 | public function start() |
||
118 | |||
119 | /** |
||
120 | * {@inheritDoc} |
||
121 | */ |
||
122 | public function close() |
||
139 | |||
140 | /** |
||
141 | * {@inheritDoc} |
||
142 | */ |
||
143 | public function abort() |
||
148 | |||
149 | /** |
||
150 | * {@inheritDoc} |
||
151 | */ |
||
152 | public function reset() |
||
156 | |||
157 | /** |
||
158 | * {@inheritDoc} |
||
159 | */ |
||
160 | public function destroy() |
||
173 | |||
174 | /** |
||
175 | * {@inheritDoc} |
||
176 | */ |
||
177 | public function setName(/*# string */ $sessionName) |
||
182 | |||
183 | /** |
||
184 | * {@inheritDoc} |
||
185 | */ |
||
186 | public function getName()/*# : string */ |
||
190 | |||
191 | /** |
||
192 | * {@inheritDoc} |
||
193 | */ |
||
194 | public function setId(/*# string */ $sessionId = '') |
||
199 | |||
200 | /** |
||
201 | * {@inheritDoc} |
||
202 | */ |
||
203 | public function getId()/*# : string */ |
||
217 | |||
218 | /** |
||
219 | * {@inheritDoc} |
||
220 | */ |
||
221 | public function newId() |
||
227 | |||
228 | /** |
||
229 | * {@inheritDoc} |
||
230 | */ |
||
231 | public function sessionData(/*# string */ $namespace)/*# : \ArrayObject */ |
||
243 | |||
244 | /** |
||
245 | * Throw RuntimeException if stopped |
||
246 | * |
||
247 | * @throws RuntimeException if session stopped |
||
248 | * @access protected |
||
249 | */ |
||
250 | protected function checkStopped() |
||
259 | |||
260 | protected function serializeData()/*# : string */ |
||
264 | } |
||
265 |