1 | <?php |
||
25 | abstract class IntegrationCache extends Component |
||
26 | { |
||
27 | /** |
||
28 | * The dummy cache handle |
||
29 | */ |
||
30 | const DUMMY_CACHE = 'dummy'; |
||
31 | |||
32 | /** |
||
33 | * The app cache handle |
||
34 | */ |
||
35 | const APP_CACHE = 'app'; |
||
36 | |||
37 | /** |
||
38 | * The default cache identifier |
||
39 | */ |
||
40 | const DEFAULT_CACHE = 'DEFAULT'; |
||
41 | |||
42 | /** |
||
43 | * The override file |
||
44 | */ |
||
45 | public $overrideFile; |
||
46 | |||
47 | /** |
||
48 | * Cache overrides |
||
49 | * |
||
50 | * @var array|null |
||
51 | */ |
||
52 | private $overrides; |
||
53 | |||
54 | /** |
||
55 | * @var CacheInterface[] |
||
56 | */ |
||
57 | private $cache = []; |
||
58 | |||
59 | /** |
||
60 | * @inheritdoc |
||
61 | */ |
||
62 | public function init() |
||
80 | |||
81 | /** |
||
82 | * Load override cache configurations |
||
83 | */ |
||
84 | protected function loadOverrides() |
||
94 | |||
95 | /** |
||
96 | * Returns any configurations from the config file. |
||
97 | * |
||
98 | * @param string $handle |
||
99 | * @return array|null |
||
100 | */ |
||
101 | public function getOverrides(string $handle) |
||
106 | |||
107 | /** |
||
108 | * @return string |
||
109 | */ |
||
110 | protected function getDefaultCache(): string |
||
114 | |||
115 | /** |
||
116 | * @param string $handle |
||
117 | * @return CacheInterface|null |
||
118 | */ |
||
119 | protected function handleCacheNotFound(string $handle) |
||
123 | |||
124 | /** |
||
125 | * @param string $handle |
||
126 | * @return CacheInterface|null |
||
127 | */ |
||
128 | public function find(string $handle = self::DEFAULT_CACHE) |
||
140 | |||
141 | /** |
||
142 | * @param string $handle |
||
143 | * @return CacheInterface |
||
144 | */ |
||
145 | public function get(string $handle = self::DEFAULT_CACHE): CacheInterface |
||
153 | |||
154 | /** |
||
155 | * @param $config |
||
156 | * @return CacheInterface|null |
||
157 | */ |
||
158 | protected function create(array $config) |
||
181 | |||
182 | /** |
||
183 | * @return array |
||
184 | */ |
||
185 | public function all(): array |
||
200 | } |
||
201 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.