matomo
/
app
/
vendor
/
prefixed
/
symfony
/
http-kernel
/
DependencyInjection
/
MergeExtensionConfigurationPass.php
AddAnnotatedClassesToCachePass.php
1 year ago
ConfigurableExtension.php
2 years ago
ControllerArgumentValueResolverPass.php
2 years ago
Extension.php
2 years ago
FragmentRendererPass.php
1 year ago
LazyLoadingFragmentHandler.php
1 year ago
LoggerPass.php
1 year ago
MergeExtensionConfigurationPass.php
2 years ago
RegisterControllerArgumentLocatorsPass.php
1 year ago
RegisterLocaleAwareServicesPass.php
2 years ago
RemoveEmptyControllerArgumentLocatorsPass.php
1 year ago
ResettableServicePass.php
1 year ago
ServicesResetter.php
2 years ago
MergeExtensionConfigurationPass.php
40 lines
| 1 | <?php |
| 2 | |
| 3 | /* |
| 4 | * This file is part of the Symfony package. |
| 5 | * |
| 6 | * (c) Fabien Potencier <fabien@symfony.com> |
| 7 | * |
| 8 | * For the full copyright and license information, please view the LICENSE |
| 9 | * file that was distributed with this source code. |
| 10 | */ |
| 11 | namespace Matomo\Dependencies\Symfony\Component\HttpKernel\DependencyInjection; |
| 12 | |
| 13 | use Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass as BaseMergeExtensionConfigurationPass; |
| 14 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
| 15 | /** |
| 16 | * Ensures certain extensions are always loaded. |
| 17 | * |
| 18 | * @author Kris Wallsmith <kris@symfony.com> |
| 19 | */ |
| 20 | class MergeExtensionConfigurationPass extends BaseMergeExtensionConfigurationPass |
| 21 | { |
| 22 | private $extensions; |
| 23 | /** |
| 24 | * @param string[] $extensions |
| 25 | */ |
| 26 | public function __construct(array $extensions) |
| 27 | { |
| 28 | $this->extensions = $extensions; |
| 29 | } |
| 30 | public function process(ContainerBuilder $container) |
| 31 | { |
| 32 | foreach ($this->extensions as $extension) { |
| 33 | if (!\count($container->getExtensionConfig($extension))) { |
| 34 | $container->loadFromExtension($extension, []); |
| 35 | } |
| 36 | } |
| 37 | parent::process($container); |
| 38 | } |
| 39 | } |
| 40 |