composer package updates
[openemr.git] / vendor / symfony / dependency-injection / Compiler / RemoveAbstractDefinitionsPass.php
blob9999214c8b763b19319ae3d1405c008f988c83ed
1 <?php
3 /*
4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\DependencyInjection\Compiler;
14 use Symfony\Component\DependencyInjection\ContainerBuilder;
16 /**
17 * Removes abstract Definitions.
19 class RemoveAbstractDefinitionsPass implements CompilerPassInterface
21 /**
22 * Removes abstract definitions from the ContainerBuilder.
24 public function process(ContainerBuilder $container)
26 $compiler = $container->getCompiler();
27 $formatter = $compiler->getLoggingFormatter();
29 foreach ($container->getDefinitions() as $id => $definition) {
30 if ($definition->isAbstract()) {
31 $container->removeDefinition($id);
32 $compiler->addLogMessage($formatter->formatRemoveService($this, $id, 'abstract'));