| @@ 45-61 (lines=17) @@ | ||
| 42 | /** |
|
| 43 | * {@inheritdoc} |
|
| 44 | */ |
|
| 45 | public function get($key) |
|
| 46 | { |
|
| 47 | $fileName = $this->getFileName($key); |
|
| 48 | ||
| 49 | if (!file_exists($fileName)) { |
|
| 50 | return false; |
|
| 51 | } |
|
| 52 | ||
| 53 | $data = file_get_contents($fileName); |
|
| 54 | list($strDenyAccess, $ttl, $serializedValue) = explode('|', $data, 3); |
|
| 55 | ||
| 56 | if ($ttl > time()) { |
|
| 57 | return false; |
|
| 58 | } |
|
| 59 | ||
| 60 | return unserialize($serializedValue); |
|
| 61 | } |
|
| 62 | ||
| 63 | /** |
|
| 64 | * {@inheritdoc} |
|
| @@ 43-59 (lines=17) @@ | ||
| 40 | /** |
|
| 41 | * {@inheritdoc} |
|
| 42 | */ |
|
| 43 | public function get($key) |
|
| 44 | { |
|
| 45 | $fileName = $this->getFileName($key); |
|
| 46 | ||
| 47 | if (!file_exists($fileName)) { |
|
| 48 | return false; |
|
| 49 | } |
|
| 50 | ||
| 51 | $data = file_get_contents($fileName); |
|
| 52 | list($ttl, $serializedValue) = explode('|', $data, 2); |
|
| 53 | ||
| 54 | if ($ttl > time()) { |
|
| 55 | return false; |
|
| 56 | } |
|
| 57 | ||
| 58 | return unserialize($serializedValue); |
|
| 59 | } |
|
| 60 | ||
| 61 | /** |
|
| 62 | * {@inheritdoc} |
|