28 lines
774 B
PHP
Raw Normal View History

2016-07-12 00:33:55 +02:00
<?php
/*
2016-12-29 12:09:26 +01:00
* This file is part of the NelmioApiDocBundle package.
2016-07-12 00:33:55 +02:00
*
2016-12-29 12:09:26 +01:00
* (c) Nelmio
2016-07-12 00:33:55 +02:00
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
2016-12-29 12:09:26 +01:00
namespace Nelmio\ApiDocBundle\DependencyInjection\Compiler;
2016-07-12 00:33:55 +02:00
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\ContainerBuilder;
2016-07-15 00:40:30 +02:00
class AddDescribersPass implements CompilerPassInterface
2016-07-12 00:33:55 +02:00
{
use PriorityTaggedServiceTrait;
public function process(ContainerBuilder $container)
{
2016-12-29 12:09:26 +01:00
$describers = $this->findAndSortTaggedServices('nelmio_api_doc.describer', $container);
2016-07-12 00:33:55 +02:00
2016-12-29 12:09:26 +01:00
$container->getDefinition('nelmio_api_doc.generator')->replaceArgument(0, $describers);
2016-07-12 00:33:55 +02:00
}
}