* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Translation\DependencyInjection; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Exception\RuntimeException; use Symfony\Component\DependencyInjection\Reference; /** * Adds tagged translation.extractor services to translation extractor. */ class TranslationExtractorPass implements CompilerPassInterface { /** * @return void */ public function process(ContainerBuilder $container) { if (!$container->hasDefinition('translation.extractor')) { return; } $definition = $container->getDefinition('translation.extractor'); foreach ($container->findTaggedServiceIds('translation.extractor', true) as $id => $attributes) { if (!isset($attributes[0]['alias'])) { throw new RuntimeException(sprintf('The alias for the tag "translation.extractor" of service "%s" must be set.', $id)); } $definition->addMethodCall('addExtractor', [$attributes[0]['alias'], new Reference($id)]); } } } __halt_compiler();----SIGNATURE:----hT+N10RIoQbZTFLRDGnJ80UbaRM6obTURAthfFpuSnWltY1vh4JTE7h0V/Bp5gQk+zyt7blzoGlQPMuoGQW6wvY3wbJrlxTY/T1qwXudFLxIlaAa9AaBJyYRqIQdASyrQMMDGBDeOricbMF510BLs5J8nTAXGDO3OKdrLsjQjNf2BR8Ktfw/929FVKwcAUxb4pUinUWPHzAQtWtGFAp+tEJz6xLzCEteqAaSh+J7100jXUcfK2d/gZl7E88ZIPuSwTVhmJIwMh1qmGhogFsKpfcc6e5LPh8k5Uy6jDvnhoXn9adubtkWheGxPn0v9QJx3DoXZBXF7V1bYnwCY2ptzOSCola5hhpQmBkM6oZdIQa2jSMXJ+mAhVG+BOPnskHJx2kSqBZf4cIW9vHisJlTX/LQhbcyMQiwbDiqm1kdUC0I3cUccOf2IzuSZMpSr6lwBClwuNFcXYSS1yG/P7fXJqSgG2JuEoNaXc5dmgJdf7S/dkRsrg6UBGM50r4ZeSo+iuJVdJ4r7muAi8tv/TtjmQ7C2Xk97LXdM0CxlYWDWpcRAwCaWgsv4e1doIgnMYRlnmzhTeHqlltVO9p64dOvG6AONRF0niK6kfH/f3j8bv1OGpRAcFrB5gcIeXdUFAv4Tr158apOdqqm3aojzV+9rnERccWUZcIqz84QthBoypQ=----ATTACHMENT:----Nzc2NTk5NjAzNTkzMDY3MyA0OTM2MDE4OTY0NDg5NjcxIDc5MjkxMTIwMzUyNjU5MTg=