vendor/thecodingmachine/graphqlite-bundle/GraphQLiteBundle.php line 14

Open in your IDE?
  1. <?php
  2. namespace TheCodingMachine\GraphQLite\Bundle;
  3. use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
  4. use TheCodingMachine\GraphQLite\Bundle\DependencyInjection\GraphQLiteExtension;
  5. use TheCodingMachine\GraphQLite\Bundle\DependencyInjection\OverblogGraphiQLEndpointWiringPass;
  6. use Symfony\Component\DependencyInjection\Compiler\PassConfig;
  7. use Symfony\Component\DependencyInjection\ContainerBuilder;
  8. use Symfony\Component\HttpKernel\Bundle\Bundle;
  9. use TheCodingMachine\GraphQLite\Bundle\DependencyInjection\GraphQLiteCompilerPass;
  10. class GraphQLiteBundle extends Bundle
  11. {
  12.     public function build(ContainerBuilder $container): void
  13.     {
  14.         parent::build($container);
  15.         $container->addCompilerPass(new GraphQLiteCompilerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION);
  16.         $container->addCompilerPass(new OverblogGraphiQLEndpointWiringPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -1);
  17.     }
  18.     public function getContainerExtension(): ?ExtensionInterface
  19.     {
  20.         if (null === $this->extension) {
  21.             $this->extension = new GraphQLiteExtension();
  22.         }
  23.         return $this->extension;
  24.     }
  25. }