1 | <?php namespace Modules\Core\Providers; |
||
16 | class CoreServiceProvider extends ServiceProvider |
||
17 | { |
||
18 | /** |
||
19 | * Indicates if loading of the provider is deferred. |
||
20 | * |
||
21 | * @var bool |
||
22 | */ |
||
23 | protected $defer = false; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | protected $prefix = 'asgard'; |
||
29 | |||
30 | /** |
||
31 | * The filters base class name. |
||
32 | * |
||
33 | * @var array |
||
34 | */ |
||
35 | protected $middleware = [ |
||
36 | 'Core' => [ |
||
37 | 'permissions' => 'PermissionMiddleware', |
||
38 | 'auth.admin' => 'AdminMiddleware', |
||
39 | 'public.checkLocale' => 'PublicMiddleware', |
||
40 | 'localizationRedirect' => 'LocalizationMiddleware', |
||
41 | ], |
||
42 | ]; |
||
43 | |||
44 | public function boot(Dispatcher $dispatcher, SidebarManager $manager) |
||
58 | |||
59 | /** |
||
60 | * Register the service provider. |
||
61 | * |
||
62 | * @return void |
||
63 | */ |
||
64 | public function register() |
||
79 | |||
80 | /** |
||
81 | * Get the services provided by the provider. |
||
82 | * |
||
83 | * @return array |
||
84 | */ |
||
85 | public function provides() |
||
89 | |||
90 | /** |
||
91 | * Register the filters. |
||
92 | * |
||
93 | * @param Router $router |
||
94 | * @return void |
||
95 | */ |
||
96 | public function registerMiddleware(Router $router) |
||
106 | |||
107 | /** |
||
108 | * Register the console commands |
||
109 | */ |
||
110 | private function registerCommands() |
||
118 | |||
119 | private function registerServices() |
||
127 | |||
128 | /** |
||
129 | * Register the modules aliases |
||
130 | */ |
||
131 | private function registerModuleResourceNamespaces() |
||
139 | |||
140 | /** |
||
141 | * Register the view namespaces for the modules |
||
142 | * @param Module $module |
||
143 | */ |
||
144 | protected function registerViewNamespace(Module $module) |
||
154 | |||
155 | /** |
||
156 | * Register the language namespaces for the modules |
||
157 | * @param Module $module |
||
158 | */ |
||
159 | protected function registerLanguageNamespace(Module $module) |
||
182 | |||
183 | /** |
||
184 | * Register the config namespace |
||
185 | * @param Module $module |
||
186 | */ |
||
187 | private function registerConfigNamespace(Module $module) |
||
201 | |||
202 | /** |
||
203 | * @param $file |
||
204 | * @param $package |
||
205 | * @return string |
||
206 | */ |
||
207 | private function getConfigFilename($file, $package) |
||
215 | |||
216 | /** |
||
217 | * Set the locale configuration for |
||
218 | * - laravel localization |
||
219 | * - laravel translatable |
||
220 | */ |
||
221 | private function setLocalesConfigurations() |
||
250 | |||
251 | /** |
||
252 | * @param string $path |
||
253 | * @return bool |
||
254 | */ |
||
255 | private function hasPublishedTranslations($path) |
||
259 | |||
260 | /** |
||
261 | * Does a Module have it's Translations centralised in the Translation module? |
||
262 | * @param Module $module |
||
263 | * @return bool |
||
264 | */ |
||
265 | private function moduleHasCentralisedTranslations(Module $module) |
||
273 | |||
274 | /** |
||
275 | * Get the absolute path to the Centralised Translations for a Module (via the Translations module) |
||
276 | * @param Module $module |
||
277 | * @return string |
||
278 | */ |
||
279 | private function getCentralisedTranslationPath(Module $module) |
||
283 | } |
||
284 |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: