1 | <?php |
||
11 | class Manager |
||
12 | { |
||
13 | use SingletonTrait; |
||
14 | |||
15 | protected $active = true; |
||
16 | |||
17 | protected $ttl = 180; |
||
18 | |||
19 | protected $data; |
||
20 | |||
21 | /** |
||
22 | * @param $cacheId |
||
23 | * |
||
24 | * @return mixed |
||
25 | */ |
||
26 | public function get($cacheId) |
||
34 | |||
35 | /** |
||
36 | * @param $cacheId |
||
37 | * |
||
38 | * @return bool |
||
39 | */ |
||
40 | public function valid($cacheId) |
||
51 | |||
52 | /** |
||
53 | * @return bool |
||
54 | */ |
||
55 | public function isActive() |
||
59 | |||
60 | /** |
||
61 | * @param $active |
||
62 | * |
||
63 | * @return $this |
||
64 | */ |
||
65 | public function setActive($active) |
||
71 | |||
72 | /** |
||
73 | * @param $cacheId |
||
74 | * |
||
75 | * @return bool |
||
76 | */ |
||
77 | public function exists($cacheId) |
||
81 | |||
82 | /** |
||
83 | * @param $cacheId |
||
84 | * |
||
85 | * @return string |
||
86 | */ |
||
87 | public function filePath($cacheId) |
||
92 | |||
93 | /** |
||
94 | * @return string |
||
95 | */ |
||
96 | public function cachePath() |
||
100 | |||
101 | /** |
||
102 | * @param $cacheId |
||
103 | * |
||
104 | * @return mixed |
||
105 | */ |
||
106 | public function getData($cacheId) |
||
114 | |||
115 | /** |
||
116 | * @param $cacheId |
||
117 | * @param bool $retry |
||
118 | * |
||
119 | * @return bool|mixed |
||
120 | */ |
||
121 | public function loadData($cacheId, $retry = true) |
||
138 | |||
139 | /** |
||
140 | * @param $cacheId |
||
141 | */ |
||
142 | public function reload($cacheId) |
||
145 | |||
146 | /** |
||
147 | * @param $cacheId |
||
148 | * @param $data |
||
149 | * |
||
150 | * @return $this |
||
151 | */ |
||
152 | public function set($cacheId, $data) |
||
158 | |||
159 | public function put($cacheId, $data) |
||
164 | |||
165 | /** |
||
166 | * @param $cacheId |
||
167 | * @param $data |
||
168 | * |
||
169 | * @return bool |
||
170 | */ |
||
171 | public function saveData($cacheId, $data) |
||
178 | |||
179 | /** |
||
180 | * @param $file |
||
181 | * @param $content |
||
182 | * |
||
183 | * @return bool |
||
184 | */ |
||
185 | public function save($file, $content) |
||
205 | |||
206 | /** |
||
207 | * @param $cacheId |
||
208 | */ |
||
209 | public function delete($cacheId) |
||
216 | |||
217 | /** |
||
218 | * @return int |
||
219 | */ |
||
220 | public function getTtl(): int |
||
224 | |||
225 | /** |
||
226 | * @param int $ttl |
||
227 | */ |
||
228 | public function setTtl(int $ttl) |
||
232 | } |
||
233 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.