vendor/ibexa/core/src/bundle/IO/IbexaIOBundle.php line 15

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\IO;
  7. use Ibexa\Bundle\IO\DependencyInjection\Compiler;
  8. use Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory;
  9. use Ibexa\Bundle\IO\DependencyInjection\IbexaIOExtension;
  10. use Symfony\Component\DependencyInjection\ContainerBuilder;
  11. use Symfony\Component\HttpKernel\Bundle\Bundle;
  12. class IbexaIOBundle extends Bundle
  13. {
  14. /** @var \Ibexa\Bundle\IO\DependencyInjection\IbexaIOExtension */
  15. protected $extension;
  16. public function build(ContainerBuilder $container)
  17. {
  18. $extension = $this->getContainerExtension();
  19. $container->addCompilerPass(
  20. new Compiler\IOConfigurationPass(
  21. $extension->getMetadataHandlerFactories(),
  22. $extension->getBinarydataHandlerFactories()
  23. )
  24. );
  25. $container->addCompilerPass(new Compiler\MigrationFileListerPass());
  26. parent::build($container);
  27. }
  28. public function getContainerExtension()
  29. {
  30. if (!isset($this->extension)) {
  31. $this->extension = new IbexaIOExtension();
  32. $this->extension->addMetadataHandlerFactory('flysystem', new ConfigurationFactory\MetadataHandler\Flysystem());
  33. $this->extension->addMetadataHandlerFactory('legacy_dfs_cluster', new ConfigurationFactory\MetadataHandler\LegacyDFSCluster());
  34. $this->extension->addBinarydataHandlerFactory('flysystem', new ConfigurationFactory\BinarydataHandler\Flysystem());
  35. }
  36. return $this->extension;
  37. }
  38. }
  39. class_alias(IbexaIOBundle::class, 'eZ\Bundle\EzPublishIOBundle\EzPublishIOBundle');