1 | <?php |
||
18 | class CacheDecorator implements SettingInterface |
||
19 | { |
||
20 | /** |
||
21 | * @var SettingInterface |
||
22 | */ |
||
23 | private $repo; |
||
24 | /** |
||
25 | * @var mixed |
||
26 | */ |
||
27 | private $cache; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | private $key; |
||
33 | |||
34 | /** |
||
35 | * CacheDecorator constructor. |
||
36 | * @param SettingInterface $repo |
||
37 | */ |
||
38 | 5 | public function __construct(SettingInterface $repo) |
|
44 | |||
45 | /** |
||
46 | * @param array $settings |
||
47 | * @return mixed |
||
48 | */ |
||
49 | 4 | public function setSetting(array $settings) |
|
62 | |||
63 | |||
64 | /** |
||
65 | * @param $key |
||
66 | * @param null $default |
||
67 | * @return mixed|string |
||
68 | */ |
||
69 | 3 | public function getSetting($key, $default = null) |
|
77 | |||
78 | /** |
||
79 | * @return mixed |
||
80 | */ |
||
81 | 3 | public function allToArray() |
|
91 | } |
||
92 |