PluginProbe
WindPress – Tailwind CSS integration for WordPress / 3.0.13
WindPress – Tailwind CSS integration for WordPress v3.0.13
3.2.90 3.2.89 3.2.88 3.2.87 3.2.86 3.2.85 3.2.84 3.2.83 3.2.82 3.2.81 trunk 3.0.0 3.0.1 3.0.10 3.0.11 3.0.12 3.0.13 3.0.14 3.0.15 3.0.16 3.0.17 3.0.2 3.0.3 3.0.4 3.0.5 All 144 releases
windpress / vendor / symfony / property-info / DependencyInjection / PropertyInfoPass.php

PropertyInfoPass.php in WindPress – Tailwind CSS integration for WordPress 3.0.13, at vendor/symfony/property-info/DependencyInjection/PropertyInfoPass.php

64 lines 3.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <fabien@symfony.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11 namespace WindPressDeps\Symfony\Component\PropertyInfo\DependencyInjection;
12
13 use WindPressDeps\Symfony\Component\DependencyInjection\Argument\IteratorArgument;
14 use WindPressDeps\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
15 use WindPressDeps\Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait;
16 use WindPressDeps\Symfony\Component\DependencyInjection\ContainerBuilder;
17 /**
18 * Adds extractors to the property_info service.
19 *
20 * @author Kévin Dunglas <dunglas@gmail.com>
21 */
22 class PropertyInfoPass implements CompilerPassInterface
23 {
24 use PriorityTaggedServiceTrait;
25 private $propertyInfoService;
26 private $listExtractorTag;
27 private $typeExtractorTag;
28 private $descriptionExtractorTag;
29 private $accessExtractorTag;
30 private $initializableExtractorTag;
31 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')
32 {
33 if (0 < \func_num_args()) {
34 trigger_deprecation('symfony/property-info', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
35 }
36 $this->propertyInfoService = $propertyInfoService;
37 $this->listExtractorTag = $listExtractorTag;
38 $this->typeExtractorTag = $typeExtractorTag;
39 $this->descriptionExtractorTag = $descriptionExtractorTag;
40 $this->accessExtractorTag = $accessExtractorTag;
41 $this->initializableExtractorTag = $initializableExtractorTag;
42 }
43 /**
44 * {@inheritdoc}
45 */
46 public function process(ContainerBuilder $container)
47 {
48 if (!$container->hasDefinition($this->propertyInfoService)) {
49 return;
50 }
51 $definition = $container->getDefinition($this->propertyInfoService);
52 $listExtractors = $this->findAndSortTaggedServices($this->listExtractorTag, $container);
53 $definition->replaceArgument(0, new IteratorArgument($listExtractors));
54 $typeExtractors = $this->findAndSortTaggedServices($this->typeExtractorTag, $container);
55 $definition->replaceArgument(1, new IteratorArgument($typeExtractors));
56 $descriptionExtractors = $this->findAndSortTaggedServices($this->descriptionExtractorTag, $container);
57 $definition->replaceArgument(2, new IteratorArgument($descriptionExtractors));
58 $accessExtractors = $this->findAndSortTaggedServices($this->accessExtractorTag, $container);
59 $definition->replaceArgument(3, new IteratorArgument($accessExtractors));
60 $initializableExtractors = $this->findAndSortTaggedServices($this->initializableExtractorTag, $container);
61 $definition->setArgument(4, new IteratorArgument($initializableExtractors));
62 }
63 }
64