vendor/ibexa/fastly/src/bundle/IbexaFastlyBundle.php line 17

Open in your IDE?
  1. <?php
  2. /**
  3. * @copyright Copyright (C) Ibexa AS. All rights reserved.
  4. * @license For full copyright and license information view LICENSE file distributed with this source code.
  5. */
  6. namespace Ibexa\Bundle\Fastly;
  7. use Ibexa\Bundle\Fastly\DependencyInjection\Compiler\KernelPass;
  8. use Ibexa\Bundle\Fastly\DependencyInjection\Configuration\Parser\FastlyConfigParser;
  9. use Ibexa\Bundle\Fastly\DependencyInjection\Configuration\Parser\FastlyVariationsParser;
  10. use Ibexa\Bundle\Fastly\DependencyInjection\IbexaFastlyExtension;
  11. use Symfony\Component\DependencyInjection\ContainerBuilder;
  12. use Symfony\Component\HttpKernel\Bundle\Bundle;
  13. class IbexaFastlyBundle extends Bundle
  14. {
  15. public function build(ContainerBuilder $container)
  16. {
  17. parent::build($container);
  18. /** @var \Ibexa\Bundle\Core\DependencyInjection\IbexaCoreExtension $core */
  19. $core = $container->getExtension('ibexa');
  20. $core->addDefaultSettings(__DIR__ . '/Resources/config', ['default_settings.yaml']);
  21. $core->addConfigParser(new FastlyVariationsParser());
  22. /** @var \Ibexa\Bundle\HttpCache\DependencyInjection\IbexaHttpCacheExtension $httpCacheExtension */
  23. $httpCacheExtension = $container->getExtension('ibexa_http_cache');
  24. $httpCacheExtension->addExtraConfigParser(new FastlyConfigParser());
  25. $container->addCompilerPass(new KernelPass());
  26. }
  27. public function getContainerExtension()
  28. {
  29. if (null === $this->extension) {
  30. $this->extension = new IbexaFastlyExtension();
  31. }
  32. return $this->extension;
  33. }
  34. }
  35. class_alias(IbexaFastlyBundle::class, 'EzSystems\PlatformFastlyCacheBundle\EzSystemsPlatformFastlyCacheBundle');