* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\Alias; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; /** * Sets a service to be an alias of another one, given a format pattern. */ class AutoAliasServicePass implements CompilerPassInterface { /** * {@inheritdoc} */ public function process(ContainerBuilder $container) { foreach ($container->findTaggedServiceIds('auto_alias') as $serviceId => $tags) { foreach ($tags as $tag) { if (!isset($tag['format'])) { throw new InvalidArgumentException(sprintf('Missing tag information "format" on auto_alias service "%s".', $serviceId)); } $aliasId = $container->getParameterBag()->resolveValue($tag['format']); if ($container->hasDefinition($aliasId) || $container->hasAlias($aliasId)) { $container->setAlias($serviceId, new Alias($aliasId, true)); } } } } } __halt_compiler();----SIGNATURE:----MbCUE7Bf35UAW0mBzqKSQzdum/NMlPWV9Z9eeoWzO4Psw4eSxrGFOsiQOSby5fWo1/tuDszOOuTgFkEe/65vg/d9z5F0Qs8gEPc01mYS8rIKuqsksTjdSt2VC2M3JhSiaLj4cfGIAS2kAEUv/95Axs8exJyzgjBsim/a7rQhveWDpMy1akxplOj7JUj13nvk4tKby+1JlAna9wOYEmO7m0xx0BMqta4jlaj14g67CoQF1rjYtzeOF5MM9Jlu8afdj4kxJfgWQZedeudAcTxDQH0k5j4msaKrBIEsO6i1xBaTGh0ubi86Rz8XbTZ3qy3hDVwV+HMF8jNkfX/crKbKqu2i/6LUn1HlPLoGgne4xOL1x+9Q2/CdCHjxfezK+ykNAqfYi92n9XUoRMo40rVc//Lh3/19DzOk9zvimiHQL2O49mJGCfupoyzj37rL676OXIyzrmy3wQ+zESFS8P4mmqiWEOSk04rZCjJJlJfZwDrbx5xdEhplt8ixqBdbW43e+yPtepbNoSbQkY4Sn9ltTv0jAgchwbtIq+Ai9dWypZ/AYfSKs13kvqNT2RKnJDnDhGTDxGeYKJixxGddiymC5bonM0V+nCMCJtKHW5xiprR1Vh+M6aAiJN+6l+1nCEc6ap0eWUJ/ETfNtDoBMjIH2ZbH3SP6lS467nT5X2OVHgU=----ATTACHMENT:----NDQyNjgwNjk0MDY3Njc1NiAxODczMTg3OTk5NzgyMjE4IDc2ODA0NzU5NzY2Mzk5Mzk=