1 | <?php namespace Arcanesoft\Core\Bases; |
||
13 | abstract class PackageServiceProvider extends ServiceProvider |
||
14 | { |
||
15 | /* ----------------------------------------------------------------- |
||
16 | | Properties |
||
17 | | ----------------------------------------------------------------- |
||
18 | */ |
||
19 | |||
20 | /** |
||
21 | * Vendor name. |
||
22 | * |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $vendor = 'arcanesoft'; |
||
26 | |||
27 | /** |
||
28 | * Register the core service provider. |
||
29 | * |
||
30 | * @var bool |
||
31 | */ |
||
32 | protected $registerCoreServiceProvider = true; |
||
33 | |||
34 | /* ----------------------------------------------------------------- |
||
35 | | Getters & Setters |
||
36 | | ----------------------------------------------------------------- |
||
37 | */ |
||
38 | |||
39 | /** |
||
40 | * Get config key. |
||
41 | * |
||
42 | * @return string |
||
43 | */ |
||
44 | 124 | protected function getConfigKey() |
|
48 | |||
49 | /** |
||
50 | * Get the sidebar folder. |
||
51 | * |
||
52 | * @return string |
||
53 | */ |
||
54 | protected function getSidebarFolder() |
||
58 | |||
59 | /** |
||
60 | * Get the sidebar config key. |
||
61 | * |
||
62 | * @return string |
||
63 | */ |
||
64 | protected function getSidebarKey() |
||
68 | |||
69 | /* ----------------------------------------------------------------- |
||
70 | | Main Methods |
||
71 | | ----------------------------------------------------------------- |
||
72 | */ |
||
73 | |||
74 | /** |
||
75 | * Register the service provider. |
||
76 | */ |
||
77 | 124 | public function register() |
|
78 | { |
||
79 | 124 | parent::register(); |
|
80 | |||
81 | 124 | if ($this->registerCoreServiceProvider) { |
|
82 | $this->registerCoreServiceProvider(); |
||
83 | } |
||
84 | 124 | } |
|
85 | |||
86 | /** |
||
87 | * Register the Core service provider. |
||
88 | */ |
||
89 | protected function registerCoreServiceProvider() |
||
93 | |||
94 | /** |
||
95 | * Publish all the package files. |
||
96 | * |
||
97 | * @param bool $load |
||
98 | */ |
||
99 | protected function publishAll($load = true) |
||
105 | |||
106 | /** |
||
107 | * Publish the config file. |
||
108 | */ |
||
109 | protected function publishConfig() |
||
115 | |||
116 | /** |
||
117 | * Publish all the sidebar config files. |
||
118 | */ |
||
119 | protected function publishSidebarItems() |
||
125 | |||
126 | /** |
||
127 | * Register all the sidebar config files. |
||
128 | */ |
||
129 | protected function registerSidebarItems() |
||
135 | } |
||
136 |