NelmioApiDocBundle/DependencyInjection/Compiler/AddRouteDescribersPass.php

29 lines
882 B
PHP
Raw Normal View History

2016-07-12 00:33:55 +02:00
<?php
/*
* This file is part of the ApiDocBundle package.
*
* (c) EXSyst
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace EXSyst\Bundle\ApiDocBundle\DependencyInjection\Compiler;
2016-07-15 00:04:07 +02:00
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
2016-07-12 00:33:55 +02:00
use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait;
use Symfony\Component\DependencyInjection\ContainerBuilder;
2016-07-15 00:40:30 +02:00
class AddRouteDescribersPass implements CompilerPassInterface
2016-07-12 00:33:55 +02:00
{
use PriorityTaggedServiceTrait;
public function process(ContainerBuilder $container)
{
2016-07-15 00:40:30 +02:00
$routeDescribers = $this->findAndSortTaggedServices('exsyst_api_doc.route_describer', $container);
2016-07-12 00:33:55 +02:00
2016-07-29 10:22:40 +02:00
$container->getDefinition('exsyst_api_doc.describers.route')->replaceArgument(3, $routeDescribers);
2016-07-12 00:33:55 +02:00
}
}