vendor/overblog/graphiql-bundle/OverblogGraphiQLBundle.php line 25

Open in your IDE?
  1. <?php
  2. namespace Overblog\GraphiQLBundle;
  3. use Overblog\GraphiQLBundle\DependencyInjection\Compiler\Endpoints\DefaultEndpointWiringPass;
  4. use Overblog\GraphiQLBundle\DependencyInjection\Compiler\Endpoints\OverblogGraphQLBundleEndpointWiringPass;
  5. use Overblog\GraphiQLBundle\DependencyInjection\OverblogGraphiQLExtension;
  6. use Symfony\Component\DependencyInjection\ContainerBuilder;
  7. use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
  8. use Symfony\Component\HttpKernel\Bundle\Bundle;
  9. final class OverblogGraphiQLBundle extends Bundle
  10. {
  11.     public function build(ContainerBuilder $container)
  12.     {
  13.         parent::build($container);
  14.         $container->addCompilerPass(new OverblogGraphQLBundleEndpointWiringPass());
  15.         // DefaultEndpointWiringPass should always be the last one to
  16.         // provide the route in case no other wiring has succeeded
  17.         $container->addCompilerPass(new DefaultEndpointWiringPass());
  18.     }
  19.     public function getContainerExtension()
  20.     {
  21.         if (!$this->extension instanceof ExtensionInterface) {
  22.             $this->extension = new OverblogGraphiQLExtension();
  23.         }
  24.         return $this->extension;
  25.     }
  26. }