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

  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\FormatsCompilerPass;
  13. use HandcraftedInTheAlps\RestRoutingBundle\DependencyInjection\RestRoutingExtension;
  14. use Symfony\Component\DependencyInjection\ContainerBuilder;
  15. use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
  16. use Symfony\Component\HttpKernel\Bundle\Bundle;
  17. class RestRoutingBundle extends Bundle
  18. {
  19.     /**
  20.      * {@inheritdoc}
  21.      */
  22.     public function build(ContainerBuilder $container)
  23.     {
  24.         $container->addCompilerPass(new FormatsCompilerPass());
  25.     }
  26.     public function getContainerExtension(): ?ExtensionInterface
  27.     {
  28.         if (null === $this->extension) {
  29.             $this->extension = new RestRoutingExtension();
  30.         }
  31.         return $this->extension;
  32.     }
  33. }