Debian Codegraph @

lib/3rdParty/composer/illuminate/support/AggregateServiceProvider.php

raw symbols SCIP
1 <?php
2
3 namespace Illuminate\Support;
4
5 class AggregateServiceProvider extends ServiceProvider
6 {
7 /**
8 * The provider class names.
9 *
10 * @var array<int, class-string<\Illuminate\Support\ServiceProvider>>
11 */
12 protected $providers = [];
13
14 /**
15 * An array of the service provider instances.
16 *
17 * @var array<int, \Illuminate\Support\ServiceProvider>
18 */
19 protected $instances = [];
20
21 /**
22 * Register the service provider.
23 *
24 * @return void
25 */
26 public function register()
27 {
28 $this->instances = [];
29
30 foreach ($this->providers as $provider) {
31 $this->instances[] = $this->app->register($provider);
32 }
33 }
34
35 /**
36 * Get the services provided by the provider.
37 *
38 * @return array<int, string>
39 */
40 public function provides()
41 {
42 $provides = [];
43
44 foreach ($this->providers as $provider) {
45 $instance = $this->app->resolveProvider($provider);
46
47 $provides = array_merge($provides, $instance->provides());
48 }
49
50 return $provides;
51 }
52 }