1 | <?php |
||
12 | class PermissionRegistrar |
||
13 | { |
||
14 | /** @var \Illuminate\Contracts\Cache\Repository */ |
||
15 | protected $cache; |
||
16 | |||
17 | /** @var \Illuminate\Cache\CacheManager */ |
||
18 | protected $cacheManager; |
||
19 | |||
20 | /** @var string */ |
||
21 | protected $permissionClass; |
||
22 | |||
23 | /** @var string */ |
||
24 | protected $roleClass; |
||
25 | |||
26 | /** @var \Illuminate\Support\Collection */ |
||
27 | protected $permissions; |
||
28 | |||
29 | /** @var \DateInterval|int */ |
||
30 | public static $cacheExpirationTime; |
||
31 | |||
32 | /** @var string */ |
||
33 | public static $cacheKey; |
||
34 | |||
35 | /** @var string */ |
||
36 | public static $cacheModelKey; |
||
37 | |||
38 | /** |
||
39 | * PermissionRegistrar constructor. |
||
40 | * |
||
41 | * @param \Illuminate\Cache\CacheManager $cacheManager |
||
42 | */ |
||
43 | public function __construct(CacheManager $cacheManager) |
||
51 | |||
52 | protected function initializeCache() |
||
61 | |||
62 | protected function getCacheStoreFromConfig(): \Illuminate\Contracts\Cache\Repository |
||
79 | |||
80 | /** |
||
81 | * Register the permission check method on the gate. |
||
82 | * We resolve the Gate fresh here, for benefit of long-running instances. |
||
83 | * |
||
84 | * @return bool |
||
85 | */ |
||
86 | public function registerPermissions(): bool |
||
96 | |||
97 | /** |
||
98 | * Flush the cache. |
||
99 | */ |
||
100 | public function forgetCachedPermissions() |
||
106 | |||
107 | /** |
||
108 | * Clear class permissions. |
||
109 | * This is only intended to be called by the PermissionServiceProvider on boot, |
||
110 | * so that long-running instances like Swoole don't keep old data in memory. |
||
111 | */ |
||
112 | public function clearClassPermissions() |
||
113 | { |
||
114 | $this->permissions = null; |
||
115 | } |
||
116 | |||
117 | /** |
||
118 | * Get the permissions based on the passed params. |
||
119 | * |
||
120 | * @param array $params |
||
121 | * |
||
122 | * @return \Illuminate\Support\Collection |
||
123 | */ |
||
124 | public function getPermissions(array $params = []): Collection |
||
142 | |||
143 | /** |
||
144 | * Get an instance of the permission class. |
||
145 | * |
||
146 | * @return \Spatie\Permission\Contracts\Permission |
||
147 | */ |
||
148 | public function getPermissionClass(): Permission |
||
152 | |||
153 | public function setPermissionClass($permissionClass) |
||
159 | |||
160 | /** |
||
161 | * Get an instance of the role class. |
||
162 | * |
||
163 | * @return \Spatie\Permission\Contracts\Role |
||
164 | */ |
||
165 | public function getRoleClass(): Role |
||
169 | |||
170 | /** |
||
171 | * Get the instance of the Cache Store. |
||
172 | * |
||
173 | * @return \Illuminate\Contracts\Cache\Store |
||
174 | */ |
||
175 | public function getCacheStore(): \Illuminate\Contracts\Cache\Store |
||
179 | } |
||
180 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.