vendor/friendsofsymfony/http-cache-bundle/src/FOSHttpCacheBundle.php line 22

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the FOSHttpCacheBundle package.
  4.  *
  5.  * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. namespace FOS\HttpCacheBundle;
  11. use FOS\HttpCache\UserContext\ContextProvider;
  12. use FOS\HttpCacheBundle\DependencyInjection\Compiler\HashGeneratorPass;
  13. use FOS\HttpCacheBundle\DependencyInjection\Compiler\LoggerPass;
  14. use FOS\HttpCacheBundle\DependencyInjection\Compiler\SessionListenerPass;
  15. use FOS\HttpCacheBundle\DependencyInjection\Compiler\TagListenerPass;
  16. use Symfony\Component\DependencyInjection\ContainerBuilder;
  17. use Symfony\Component\HttpKernel\Bundle\Bundle;
  18. class FOSHttpCacheBundle extends Bundle
  19. {
  20.     /**
  21.      * {@inheritdoc}
  22.      */
  23.     public function build(ContainerBuilder $container)
  24.     {
  25.         $container->addCompilerPass(new LoggerPass());
  26.         $container->addCompilerPass(new TagListenerPass());
  27.         $container->addCompilerPass(new HashGeneratorPass());
  28.         $container->addCompilerPass(new SessionListenerPass());
  29.         $container
  30.             ->registerForAutoconfiguration(ContextProvider::class)
  31.             ->addTag('fos_http_cache.user_context_provider');
  32.     }
  33. }