This commit is contained in:
Torsten 2018-08-07 10:42:11 +02:00
parent 98419bd18d
commit 8a69e45efa
4919 changed files with 28311 additions and 224136 deletions

View file

@ -11,9 +11,10 @@
namespace Symfony\Component\Routing\DependencyInjection;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
/**
* Adds tagged routing.loader services to routing.resolver service.
@ -22,6 +23,8 @@ use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
*/
class RoutingResolverPass implements CompilerPassInterface
{
use PriorityTaggedServiceTrait;
private $resolverServiceId;
private $loaderTag;
@ -39,7 +42,7 @@ class RoutingResolverPass implements CompilerPassInterface
$definition = $container->getDefinition($this->resolverServiceId);
foreach ($container->findTaggedServiceIds($this->loaderTag, true) as $id => $attributes) {
foreach ($this->findAndSortTaggedServices($this->loaderTag, $container) as $id) {
$definition->addMethodCall('addLoader', array(new Reference($id)));
}
}