vendor/ibexa/rest/src/bundle/IbexaRestBundle.php line 14

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\Rest;
  7. use Ibexa\Bundle\Rest\DependencyInjection\Compiler;
  8. use Ibexa\Bundle\Rest\DependencyInjection\Security\RestSessionBasedFactory;
  9. use Symfony\Component\DependencyInjection\ContainerBuilder;
  10. use Symfony\Component\HttpKernel\Bundle\Bundle;
  11. class IbexaRestBundle extends Bundle
  12. {
  13.     public function build(ContainerBuilder $container)
  14.     {
  15.         parent::build($container);
  16.         $container->addCompilerPass(new Compiler\FieldTypeProcessorPass());
  17.         $container->addCompilerPass(new Compiler\InputHandlerPass());
  18.         $container->addCompilerPass(new Compiler\InputParserPass());
  19.         $container->addCompilerPass(new Compiler\OutputVisitorPass());
  20.         $container->addCompilerPass(new Compiler\ValueObjectVisitorPass());
  21.         /** @var \Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension $securityExtension */
  22.         $securityExtension $container->getExtension('security');
  23.         $securityExtension->addSecurityListenerFactory(new RestSessionBasedFactory());
  24.         if ($container->hasExtension('lexik_jwt_authentication')) {
  25.             $container->addCompilerPass(new Compiler\LexikAuthorizationHeaderBridgePass());
  26.         }
  27.     }
  28. }
  29. class_alias(IbexaRestBundle::class, 'EzSystems\EzPlatformRestBundle\EzPlatformRestBundle');