* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator\DependencyInjection; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; /** * @author Fabien Potencier * @author Robin Chalas */ class AddValidatorInitializersPass implements CompilerPassInterface { private $builderService; private $initializerTag; public function __construct($builderService = 'validator.builder', $initializerTag = 'validator.initializer') { $this->builderService = $builderService; $this->initializerTag = $initializerTag; } public function process(ContainerBuilder $container) { if (!$container->hasDefinition($this->builderService)) { return; } $initializers = array(); foreach ($container->findTaggedServiceIds($this->initializerTag, true) as $id => $attributes) { $initializers[] = new Reference($id); } $container->getDefinition($this->builderService)->addMethodCall('addObjectInitializers', array($initializers)); } } __halt_compiler();----SIGNATURE:----fwmoL/TBIlOMYqo6jVHK7H3LXiHvqBFGh1r0vJ4Tyis+S0s+VhgMSrItomzVVh1xVHC1jBe0blfOwbCVj0gNJ49LZRk7QRKtLh89x+g2VKeB+Bz7s0c+8eyK13IGiCKU62kXYdu2kBTrUNyIkXZdV/CiwIvJFDEDdThcfmo6l/wYsEGmWbfMmQ6/n5b4irbqYSKtbwZRhwileLSK92QpYB1ogGks0i4/zsJ2jblpcs36+v8x5gwLfzB2ifitPcTLjjkrZ7RwAVFgc96Ii7vuWHG5nPBjdDmyZ7gtwDtURNPG+VzY51MancVt02gqEO65PF/1IRnCLljKJchqFHZJZcJiK25Po7bmmTTbBMwUbKqPZBEceN+YXlCFNG8RQs5jOonPrClhPS99jfuCP1DxBWQok5ewGl/41/+lSpjd2bwAusdX7sw1MKy7BmoPTmDU51ydTo+JURjbCgdjoG/mAlPE4ptz7DgD5HiaHuQnYEVkx6JexX7EhhDkFYUvLV3c3zUyTkKxgkpRhyhVUoCQE9uzOFpK1wHqCz6n092PzC65/Q7wH0g4xI84bLFsROp8t6HMHqM9SBEICQkYr4ZW1lSsYCv55Jls4UCRWdZ2RMtdncZa9Bco5TScBg9RXzQ/lEGH+3IG0CcgNo7JwIGZ2JqlBvAC6rHhfoUtvD7y+qI=----ATTACHMENT:----MzgxODY4OTM0MDU3NTcxOSAyNzA5OTY1NDA3NzkxMTQ3IDQyODY3NzQwNjk4MzAyODg=