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;
|
|
|
|
|
2016-07-15 00:40:30 +02:00
|
|
|
use EXSyst\Bundle\ApiDocBundle\DependencyInjection\Compiler\AddDescribersPass;
|
|
|
|
use EXSyst\Bundle\ApiDocBundle\DependencyInjection\Compiler\AddRouteDescribersPass;
|
2016-07-12 00:33:55 +02:00
|
|
|
use EXSyst\Bundle\ApiDocBundle\DependencyInjection\EXSystApiDocExtension;
|
|
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
2016-07-15 00:04:07 +02:00
|
|
|
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
2016-07-12 00:33:55 +02:00
|
|
|
|
2016-11-30 15:04:53 +01:00
|
|
|
final class EXSystApiDocBundle extends Bundle
|
2016-07-12 00:33:55 +02:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
|
|
|
public function build(ContainerBuilder $container)
|
|
|
|
{
|
2016-07-15 00:40:30 +02:00
|
|
|
$container->addCompilerPass(new AddDescribersPass());
|
|
|
|
$container->addCompilerPass(new AddRouteDescribersPass());
|
2016-07-12 00:33:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
|
|
|
public function getContainerExtension()
|
|
|
|
{
|
|
|
|
if (null === $this->extension) {
|
|
|
|
$this->extension = new EXSystApiDocExtension();
|
|
|
|
}
|
|
|
|
if ($this->extension) {
|
|
|
|
return $this->extension;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|