/
githubmirror
/
framework
Обзор
Документация
Войти
/
githubmirror
/
framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
13.x
src/Illuminate/Support/AggregateServiceProvider.php
52 строки
1 KB
Luke Kuzmish
aggregate service provider docblocks (#56968)
08 сен 2025, 20:15
Не верифицирован
08 сен 2025, 20:15
5365db1
Код
Авторство
О чём код?
<?php namespace Illuminate\Support; class AggregateServiceProvider extends ServiceProvider { /** * The provider class names. * * @var array<int, class-string<\Illuminate\Support\ServiceProvider>> */ protected $providers = []; /** * An array of the service provider instances. * * @var array<int, \Illuminate\Support\ServiceProvider> */ protected $instances = []; /** * Register the service provider. * * @return void */ public function register() { $this->instances = []; foreach ($this->providers as $provider) { $this->instances[] = $this->app->register($provider); } } /** * Get the services provided by the provider. * * @return array<int, string> */ public function provides() { $provides = []; foreach ($this->providers as $provider) { $instance = $this->app->resolveProvider($provider); $provides = array_merge($provides, $instance->provides()); } return $provides; } }