RemovePrivateAliasesPass.php in Service Container 7.2
File
modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Compiler/RemovePrivateAliasesPass.php
View source
<?php
namespace Symfony\Component\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\ContainerBuilder;
class RemovePrivateAliasesPass implements CompilerPassInterface {
public function process(ContainerBuilder $container) {
$compiler = $container
->getCompiler();
$formatter = $compiler
->getLoggingFormatter();
foreach ($container
->getAliases() as $id => $alias) {
if ($alias
->isPublic()) {
continue;
}
$container
->removeAlias($id);
$compiler
->addLogMessage($formatter
->formatRemoveService($this, $id, 'private alias'));
}
}
}
Classes
Name |
Description |
RemovePrivateAliasesPass |
Remove private aliases from the container. They were only used to establish
dependencies between services, and these dependencies have been resolved in
one of the previous passes. |