Chris@0: Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: namespace Symfony\Component\DependencyInjection\Compiler; Chris@0: Chris@0: use Symfony\Component\DependencyInjection\ContainerBuilder; Chris@0: Chris@0: /** Chris@0: * Removes abstract Definitions. Chris@0: */ Chris@0: class RemoveAbstractDefinitionsPass implements CompilerPassInterface Chris@0: { Chris@0: /** Chris@0: * Removes abstract definitions from the ContainerBuilder. Chris@0: */ Chris@0: public function process(ContainerBuilder $container) Chris@0: { Chris@0: foreach ($container->getDefinitions() as $id => $definition) { Chris@0: if ($definition->isAbstract()) { Chris@0: $container->removeDefinition($id); Chris@14: $container->log($this, sprintf('Removed service "%s"; reason: abstract.', $id)); Chris@0: } Chris@0: } Chris@0: } Chris@0: }