Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | public function load(SessionIdInterface $id):StorableSessionInterface |
||
28 | { |
||
29 | $path = $this->buildPath($id); |
||
30 | if (!file_exists($path)) { |
||
31 | return new StorableSession(DefaultSessionData::newEmptySession(), $this); |
||
32 | } |
||
33 | $json = file_get_contents($path); |
||
34 | return StorableSession::fromId(DefaultSessionData::fromTokenData(json_decode($json, true)), $this, $id); |
||
35 | } |
||
36 | |||
47 |