1 | <?php namespace Arcanesoft\Foundation; |
||
11 | class FoundationServiceProvider extends PackageServiceProvider |
||
12 | { |
||
13 | /* ------------------------------------------------------------------------------------------------ |
||
14 | | Properties |
||
15 | | ------------------------------------------------------------------------------------------------ |
||
16 | */ |
||
17 | /** |
||
18 | * Package name. |
||
19 | * |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $package = 'foundation'; |
||
23 | |||
24 | /* ------------------------------------------------------------------------------------------------ |
||
25 | | Getters & Setters |
||
26 | | ------------------------------------------------------------------------------------------------ |
||
27 | */ |
||
28 | /** |
||
29 | * Get the base path of the package. |
||
30 | * |
||
31 | * @return string |
||
32 | */ |
||
33 | 21 | public function getBasePath() |
|
37 | |||
38 | /* ------------------------------------------------------------------------------------------------ |
||
39 | | Main Functions |
||
40 | | ------------------------------------------------------------------------------------------------ |
||
41 | */ |
||
42 | /** |
||
43 | * Register the service provider. |
||
44 | */ |
||
45 | 21 | public function register() |
|
46 | { |
||
47 | 21 | parent::register(); |
|
48 | |||
49 | 21 | $this->registerConfig(); |
|
50 | 21 | $this->registerSidebarItems(); |
|
51 | 21 | $this->registerProviders([ |
|
52 | 21 | Providers\PackagesServiceProvider::class, |
|
53 | Providers\AuthorizationServiceProvider::class, |
||
54 | ]); |
||
55 | 21 | $this->registerModuleProviders(); |
|
56 | 21 | $this->registerConsoleServiceProvider(Providers\CommandServiceProvider::class); |
|
57 | 21 | $this->registerFoundationService(); |
|
58 | 21 | } |
|
59 | |||
60 | /** |
||
61 | * Boot the service provider. |
||
62 | */ |
||
63 | 21 | public function boot() |
|
76 | |||
77 | /** |
||
78 | * Get the services provided by the provider. |
||
79 | * |
||
80 | * @return array |
||
81 | */ |
||
82 | 3 | public function provides() |
|
83 | { |
||
84 | return [ |
||
85 | 3 | Contracts\Foundation::class, |
|
86 | ]; |
||
87 | } |
||
88 | |||
89 | /* ------------------------------------------------------------------------------------------------ |
||
90 | | Services Functions |
||
91 | | ------------------------------------------------------------------------------------------------ |
||
92 | */ |
||
93 | /** |
||
94 | * Register Foundation service. |
||
95 | */ |
||
96 | 21 | private function registerFoundationService() |
|
100 | |||
101 | /** |
||
102 | * Register ARCANESOFT's modules (providers). |
||
103 | */ |
||
104 | 21 | private function registerModuleProviders() |
|
110 | } |
||
111 |