Verzeichnisstruktur phpBB-3.3.15
- Veröffentlicht
- 28.08.2024
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
RoutingResolverPass.php
01 <?php
02
03 /*
04 * This file is part of the Symfony package.
05 *
06 * (c) Fabien Potencier <fabien@symfony.com>
07 *
08 * For the full copyright and license information, please view the LICENSE
09 * file that was distributed with this source code.
10 */
11
12 namespace Symfony\Component\Routing\DependencyInjection;
13
14 use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
15 use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait;
16 use Symfony\Component\DependencyInjection\ContainerBuilder;
17 use Symfony\Component\DependencyInjection\Reference;
18
19 /**
20 * Adds tagged routing.loader services to routing.resolver service.
21 *
22 * @author Fabien Potencier <fabien@symfony.com>
23 */
24 class RoutingResolverPass implements CompilerPassInterface
25 {
26 use PriorityTaggedServiceTrait;
27
28 private $resolverServiceId;
29 private $loaderTag;
30
31 public function __construct($resolverServiceId = 'routing.resolver', $loaderTag = 'routing.loader')
32 {
33 $this->resolverServiceId = $resolverServiceId;
34 $this->loaderTag = $loaderTag;
35 }
36
37 public function process(ContainerBuilder $container)
38 {
39 if (false === $container->hasDefinition($this->resolverServiceId)) {
40 return;
41 }
42
43 $definition = $container->getDefinition($this->resolverServiceId);
44
45 foreach ($this->findAndSortTaggedServices($this->loaderTag, $container) as $id) {
46 $definition->addMethodCall('addLoader', [new Reference($id)]);
47 }
48 }
49 }
50