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
;
17 * Removes abstract Definitions.
19 class RemoveAbstractDefinitionsPass
implements CompilerPassInterface
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'));