vendor/ajgarlag/psr-http-message-bundle/src/AjgarlagPsrHttpMessageBundle.php line 24

Open in your IDE?
  1. <?php
  2. /*
  3. * PsrHttpMessageBundle by @ajgarlag
  4. *
  5. * Copyright (c) 2010-2022 Fabien Potencier
  6. * Copyright (c) 2022 Antonio J. GarcĂ­a Lagar
  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 Ajgarlag\Bundle\PsrHttpMessageBundle;
  12. use Ajgarlag\Bundle\PsrHttpMessageBundle\DependencyInjection\Compiler\AssertDefinedPsr17Factories;
  13. use Ajgarlag\Bundle\PsrHttpMessageBundle\DependencyInjection\Compiler\RegisterHttpMessageFactoriesPass;
  14. use Ajgarlag\Bundle\PsrHttpMessageBundle\DependencyInjection\Compiler\RegisterNyholmPsr17FactoriesPass;
  15. use Ajgarlag\Bundle\PsrHttpMessageBundle\DependencyInjection\Compiler\TagArgumentValueResolverPass;
  16. use Ajgarlag\Bundle\PsrHttpMessageBundle\DependencyInjection\Compiler\TagViewEventListenerPass;
  17. use Symfony\Component\DependencyInjection\Compiler\PassConfig;
  18. use Symfony\Component\DependencyInjection\ContainerBuilder;
  19. use Symfony\Component\HttpKernel\Bundle\Bundle;
  20. class AjgarlagPsrHttpMessageBundle extends Bundle
  21. {
  22. public function build(ContainerBuilder $container)
  23. {
  24. parent::build($container);
  25. $container->addCompilerPass(new TagArgumentValueResolverPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, 1);
  26. $container->addCompilerPass(new RegisterHttpMessageFactoriesPass());
  27. $container->addCompilerPass(new RegisterNyholmPsr17FactoriesPass());
  28. $container->addCompilerPass(new AssertDefinedPsr17Factories());
  29. $container->addCompilerPass(new TagViewEventListenerPass());
  30. }
  31. }