vendor/handcraftedinthealps/rest-routing-bundle/RestRoutingBundle.php line 22

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of Handcrafted in the Alps - Rest Routing Bundle Project.
  4.  *
  5.  * (c) 2011-2020 FriendsOfSymfony <http://friendsofsymfony.github.com/>
  6.  * (c) 2020 Sulu GmbH <hello@sulu.io>
  7.  *
  8.  * For the full copyright and license information, please view the LICENSE
  9.  * file that was distributed with this source code.
  10.  */
  11. namespace HandcraftedInTheAlps\RestRoutingBundle;
  12. use HandcraftedInTheAlps\RestRoutingBundle\DependencyInjection\CompilerPass\AnnotationReaderPass;
  13. use HandcraftedInTheAlps\RestRoutingBundle\DependencyInjection\CompilerPass\FormatsCompilerPass;
  14. use HandcraftedInTheAlps\RestRoutingBundle\DependencyInjection\RestRoutingExtension;
  15. use Symfony\Component\DependencyInjection\ContainerBuilder;
  16. use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
  17. use Symfony\Component\HttpKernel\Bundle\Bundle;
  18. class RestRoutingBundle extends Bundle
  19. {
  20.     /**
  21.      * {@inheritdoc}
  22.      */
  23.     public function build(ContainerBuilder $container)
  24.     {
  25.         $container->addCompilerPass(new FormatsCompilerPass());
  26.         $container->addCompilerPass(new AnnotationReaderPass());
  27.     }
  28.     public function getContainerExtension(): ?ExtensionInterface
  29.     {
  30.         if (null === $this->extension) {
  31.             $this->extension = new RestRoutingExtension();
  32.         }
  33.         return $this->extension;
  34.     }
  35. }