1 | <?php |
||
8 | class Cache |
||
9 | { |
||
10 | use ServiceInstances; |
||
11 | |||
12 | const CACHE_BASE_NAME = 'firewall.'; |
||
13 | |||
14 | private $cache; |
||
15 | |||
16 | 71 | public function __construct(CacheManager $cache) |
|
20 | |||
21 | /** |
||
22 | * Flush cache. |
||
23 | * |
||
24 | * @return void |
||
25 | */ |
||
26 | 71 | public function flush() |
|
30 | |||
31 | /** |
||
32 | * Cache remember. |
||
33 | * |
||
34 | * @param $model |
||
35 | * |
||
36 | * @return void |
||
37 | */ |
||
38 | 36 | public function remember($model) |
|
44 | |||
45 | /** |
||
46 | * Make a cache key. |
||
47 | * |
||
48 | * @param $key |
||
49 | * |
||
50 | * @return string |
||
51 | */ |
||
52 | 54 | public function key($key) |
|
56 | |||
57 | /** |
||
58 | * Check if cache has key. |
||
59 | * |
||
60 | * @param $key |
||
61 | * |
||
62 | * @return bool |
||
63 | */ |
||
64 | 53 | public function has($key) |
|
72 | |||
73 | /** |
||
74 | * Get a value from the cache. |
||
75 | * |
||
76 | * @param $key |
||
77 | * |
||
78 | * @return mixed|null |
||
79 | */ |
||
80 | 26 | public function get($key) |
|
86 | |||
87 | /** |
||
88 | * Remove an ip address from cache. |
||
89 | * |
||
90 | * @param $key |
||
91 | * |
||
92 | * @return void |
||
93 | */ |
||
94 | 8 | public function forget($key) |
|
100 | |||
101 | /** |
||
102 | * Store an item in the cache for a given number of minutes. |
||
103 | * |
||
104 | * @param string $key |
||
105 | * @param mixed $value |
||
106 | * @param int|null|bool $minutes |
||
107 | * |
||
108 | * @return void |
||
109 | */ |
||
110 | 41 | public function put($key, $value, $minutes = null) |
|
116 | |||
117 | /** |
||
118 | * Get cache expire time. |
||
119 | * |
||
120 | * @return int|bool |
||
121 | */ |
||
122 | 54 | public function expireTime() |
|
126 | |||
127 | /** |
||
128 | * Get enabled state. |
||
129 | * |
||
130 | * @return int|bool |
||
131 | */ |
||
132 | 54 | public function enabled() |
|
137 | } |
||
138 |
This check looks for access to methods that are not accessible from the current context.
If you need to make a method accessible to another context you can raise its visibility level in the defining class.