-
-
Notifications
You must be signed in to change notification settings - Fork 90
/
Copy pathsessionadapter.php
46 lines (38 loc) · 991 Bytes
/
sessionadapter.php
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
<?php
/**
* To be removed once the legacy session handlers are reworked when php 7 support is dropped
*/
class SessionAdapter implements \SessionHandlerInterface
{
protected $_handler;
public function __construct($handler)
{
$this->_handler = $handler;
}
public function close(): bool
{
return $this->_handler->close();
}
public function destroy(string $id): bool
{
return $this->_handler->destroy($id);
}
#[ReturnTypeWillChange]
public function gc(int $max_lifetime): int
{
return $this->_handler->gc($max_lifetime);
}
public function open(string $path, string $name): bool
{
return $this->_handler->open($path, $name);
}
#[ReturnTypeWillChange]
public function read(string $id): string
{
return $this->_handler->read($id);
}
public function write(string $id, string $data): bool
{
return $this->_handler->write($id, $data);
}
}