1 | <?php declare(strict_types = 1); |
||
17 | abstract class AbstractServiceProvider implements ServiceProvider |
||
18 | { |
||
19 | |||
20 | /** |
||
21 | * Application config. |
||
22 | * |
||
23 | * @var MutableConfig |
||
24 | */ |
||
25 | private $config; |
||
26 | |||
27 | /** |
||
28 | * Container instance. |
||
29 | * |
||
30 | * @var Container |
||
31 | */ |
||
32 | private $container; |
||
33 | |||
34 | /** |
||
35 | * AbstractServiceProvider constructor. |
||
36 | * |
||
37 | * @param Container $container |
||
38 | * @param MutableConfig $mutableConfig |
||
39 | */ |
||
40 | public function __construct(Container $container, MutableConfig $mutableConfig) |
||
45 | |||
46 | /** |
||
47 | * @inheritdoc |
||
48 | */ |
||
49 | public function boot() |
||
52 | |||
53 | /** |
||
54 | * @return MutableConfig |
||
55 | */ |
||
56 | protected function config(): MutableConfig |
||
60 | |||
61 | /** |
||
62 | * @return Container |
||
63 | */ |
||
64 | protected function container(): Container |
||
68 | |||
69 | /** |
||
70 | * @return Kernel |
||
71 | */ |
||
72 | protected function kernel(): Kernel |
||
76 | |||
77 | /** |
||
78 | * Merges config params from service provider with the global configuration. |
||
79 | * |
||
80 | * @param string[] ...$configFiles |
||
81 | */ |
||
82 | protected function loadConfigFromFiles(string ...$configFiles) |
||
88 | |||
89 | /** |
||
90 | * Registers commands exposed by service provider. |
||
91 | * |
||
92 | * @param string[] ...$commandClasses |
||
93 | */ |
||
94 | protected function provideCommands(string ...$commandClasses) |
||
102 | |||
103 | /** |
||
104 | * @return RouteCollection |
||
105 | */ |
||
106 | protected function routes(): RouteCollection |
||
110 | } |