* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\PropertyInfo\DependencyInjection; use Symfony\Component\DependencyInjection\Argument\IteratorArgument; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait; use Symfony\Component\DependencyInjection\ContainerBuilder; /** * Adds extractors to the property_info service. * * @author Kévin Dunglas */ class PropertyInfoPass implements CompilerPassInterface { use PriorityTaggedServiceTrait; private $propertyInfoService; private $listExtractorTag; private $typeExtractorTag; private $descriptionExtractorTag; private $accessExtractorTag; private $initializableExtractorTag; public function __construct(string $propertyInfoService = 'property_info', string $listExtractorTag = 'property_info.list_extractor', string $typeExtractorTag = 'property_info.type_extractor', string $descriptionExtractorTag = 'property_info.description_extractor', string $accessExtractorTag = 'property_info.access_extractor', string $initializableExtractorTag = 'property_info.initializable_extractor') { $this->propertyInfoService = $propertyInfoService; $this->listExtractorTag = $listExtractorTag; $this->typeExtractorTag = $typeExtractorTag; $this->descriptionExtractorTag = $descriptionExtractorTag; $this->accessExtractorTag = $accessExtractorTag; $this->initializableExtractorTag = $initializableExtractorTag; } /** * {@inheritdoc} */ public function process(ContainerBuilder $container) { if (!$container->hasDefinition($this->propertyInfoService)) { return; } $definition = $container->getDefinition($this->propertyInfoService); $listExtractors = $this->findAndSortTaggedServices($this->listExtractorTag, $container); $definition->replaceArgument(0, new IteratorArgument($listExtractors)); $typeExtractors = $this->findAndSortTaggedServices($this->typeExtractorTag, $container); $definition->replaceArgument(1, new IteratorArgument($typeExtractors)); $descriptionExtractors = $this->findAndSortTaggedServices($this->descriptionExtractorTag, $container); $definition->replaceArgument(2, new IteratorArgument($descriptionExtractors)); $accessExtractors = $this->findAndSortTaggedServices($this->accessExtractorTag, $container); $definition->replaceArgument(3, new IteratorArgument($accessExtractors)); $initializableExtractors = $this->findAndSortTaggedServices($this->initializableExtractorTag, $container); $definition->setArgument(4, new IteratorArgument($initializableExtractors)); } } __halt_compiler();----SIGNATURE:----ZSYqzPns3CB9xAz9KRSL3tAufTVmi3xZ2RMZQ/XBr0sZ0GH7O03KL6IVg3LKl+c98QlIy75+U6pi30IFGbSa7OGbYiYc/HI4KDeTZFLvQosNS9/6AuCH/MS8RiAngvHx7UypstaGaiPxyeo2hdqPX3+Q686RErEX3rQALwHAihgLfFadoIZrLHXi1QkgBSLiGkyK5Z43u6EO2F+zpPH8+XZr7Xb/YbvPSqu18035tObc9L5XNtdDJurYK+3B5Ykj++hRpMFCyxpXLJ/3YNoXxSQKgHd8n2qPe97RYR10WJ6KeWY1cvyJsQRqphS8A+QcfarqEdMY2aMl8fDu+TCfA+6yVKiRMP7RBRTVqv20QUUDXfoiQy/kXKuEiEOT8nFRIsvjORhs07WM51n+FAJAvWTNbSUESMQRukrTVOv5WO6bic4fKl1Nn7Ae7RLp7OOrSlkCo5Xu7GjPSJuLiuGGR13n8WLA9uxnSAvNEvgyzIDX0cHKdTiFtncE9f5o4h0MY03x6US8SJaP2fhpqyA6cd41ppx9Mhbhksry1aKXK/geeAKMTyQzDEdJYK/Ua6rn2qMlRQ5Xt2TexWXDu5j0xWzAY1FiXEQ+oJ4e9UUlKpjHnaGdmYkBHX1GnkWgHGJier5kn7je9nK1mS4IgmT4/T0i0P56kU4hl8lix53feww=----ATTACHMENT:----Mzk4NzkxMjMzOTkwNTg2NyA2NjY0MDYyOTU2MzQwNDc4IDM2OTM1Nzk3MTI0MTU0MTA=