/
githubmirror
/
symfony
Обзор
Документация
Войти
/
githubmirror
/
symfony
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
8.2
src/Symfony/Component/HttpKernel/Bundle/BundleAdapter.php
75 строк
2 KB
Matthias Pigulla
Do not expose the `BundleAdapter` class in the `kernel.bundles` parameter
21 июл 2026, 15:50
21 июл 2026, 15:50
5c60433
Код
Авторство
О чём код?
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\Bundle; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; use Symfony\Component\DependencyInjection\Kernel\BundleInterface as BaseBundleInterface; /** * @internal */ final class BundleAdapter implements BundleInterface { private string $namespace; public function __construct( private readonly BaseBundleInterface $bundle, ) { } public function boot(): void { $this->bundle->boot(); } public function shutdown(): void { $this->bundle->shutdown(); } public function build(ContainerBuilder $container): void { $this->bundle->build($container); } public function getContainerExtension(): ?ExtensionInterface { return $this->bundle->getContainerExtension(); } public function getName(): string { return $this->bundle->getName(); } public function getNamespace(): string { return $this->namespace ??= false === ($pos = strrpos($this->bundle::class, '\\')) ? '' : substr($this->bundle::class, 0, $pos); } public function getPath(): string { return $this->bundle->getPath(); } public function setContainer(?ContainerInterface $container): void { $this->bundle->setContainer($container); } public function getInnerBundle(): BaseBundleInterface { return $this->bundle; } }