1 | <?php |
||
16 | class CoreServiceProvider extends ServiceProvider |
||
17 | { |
||
18 | use CanPublishConfiguration; |
||
19 | /** |
||
20 | * Indicates if loading of the provider is deferred. |
||
21 | * |
||
22 | * @var bool |
||
23 | */ |
||
24 | protected $defer = false; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | protected $prefix = 'asgard'; |
||
30 | |||
31 | /** |
||
32 | * The filters base class name. |
||
33 | * |
||
34 | * @var array |
||
35 | */ |
||
36 | protected $middleware = [ |
||
37 | 'Core' => [ |
||
38 | 'permissions' => 'PermissionMiddleware', |
||
39 | 'auth.admin' => 'AdminMiddleware', |
||
40 | 'public.checkLocale' => 'PublicMiddleware', |
||
41 | 'localizationRedirect' => 'LocalizationMiddleware', |
||
42 | 'can' => 'Authorization', |
||
43 | ], |
||
44 | ]; |
||
45 | |||
46 | public function boot() |
||
58 | |||
59 | /** |
||
60 | * Register the service provider. |
||
61 | * |
||
62 | * @return void |
||
63 | */ |
||
64 | public function register() |
||
74 | |||
75 | /** |
||
76 | * Get the services provided by the provider. |
||
77 | * |
||
78 | * @return array |
||
79 | */ |
||
80 | public function provides() |
||
84 | |||
85 | /** |
||
86 | * Register the filters. |
||
87 | * |
||
88 | * @param Router $router |
||
89 | * @return void |
||
90 | */ |
||
91 | public function registerMiddleware(Router $router) |
||
101 | |||
102 | /** |
||
103 | * Register the console commands |
||
104 | */ |
||
105 | private function registerCommands() |
||
113 | |||
114 | private function registerServices() |
||
122 | |||
123 | /** |
||
124 | * Register the modules aliases |
||
125 | */ |
||
126 | private function registerModuleResourceNamespaces() |
||
133 | |||
134 | /** |
||
135 | * Register the view namespaces for the modules |
||
136 | * @param Module $module |
||
137 | */ |
||
138 | protected function registerViewNamespace(Module $module) |
||
148 | |||
149 | /** |
||
150 | * Register the language namespaces for the modules |
||
151 | * @param Module $module |
||
152 | */ |
||
153 | protected function registerLanguageNamespace(Module $module) |
||
172 | |||
173 | /** |
||
174 | * @param $file |
||
175 | * @param $package |
||
176 | * @return string |
||
177 | */ |
||
178 | private function getConfigFilename($file) |
||
182 | |||
183 | /** |
||
184 | * Set the locale configuration for |
||
185 | * - laravel localization |
||
186 | * - laravel translatable |
||
187 | */ |
||
188 | private function setLocalesConfigurations() |
||
217 | |||
218 | /** |
||
219 | * @param string $path |
||
220 | * @return bool |
||
221 | */ |
||
222 | private function hasPublishedTranslations($path) |
||
226 | |||
227 | /** |
||
228 | * Does a Module have it's Translations centralised in the Translation module? |
||
229 | * @param Module $module |
||
230 | * @return bool |
||
231 | */ |
||
232 | private function moduleHasCentralisedTranslations(Module $module) |
||
240 | |||
241 | /** |
||
242 | * Get the absolute path to the Centralised Translations for a Module (via the Translations module) |
||
243 | * @param Module $module |
||
244 | * @return string |
||
245 | */ |
||
246 | private function getCentralisedTranslationPath(Module $module) |
||
250 | |||
251 | /** |
||
252 | * List of Custom Blade Directives |
||
253 | */ |
||
254 | public function bladeDirectives() |
||
266 | |||
267 | /** |
||
268 | * Get argument array from argument string. |
||
269 | * @param $argumentString |
||
270 | * @return array |
||
271 | */ |
||
272 | private function getArguments($argumentString) |
||
276 | } |
||
277 |