vendor/elao/enum/src/Bridge/Symfony/Bundle/ElaoEnumBundle.php line 20

  1. <?php
  2. declare(strict_types=1);
  3. /*
  4.  * This file is part of the "elao/enum" package.
  5.  *
  6.  * Copyright (C) Elao
  7.  *
  8.  * @author Elao <contact@elao.com>
  9.  */
  10. namespace Elao\Enum\Bridge\Symfony\Bundle;
  11. use Elao\Enum\Bridge\Symfony\Bundle\DependencyInjection\Compiler\DoctrineDBALTypesPass;
  12. use Elao\Enum\Bridge\Symfony\Bundle\DependencyInjection\Compiler\DoctrineODMTypesPass;
  13. use Symfony\Component\DependencyInjection\ContainerBuilder;
  14. use Symfony\Component\HttpKernel\Bundle\Bundle;
  15. class ElaoEnumBundle extends Bundle
  16. {
  17.     public function build(ContainerBuilder $container): void
  18.     {
  19.         parent::build($container);
  20.         /** @var string $kernelCacheDir */
  21.         $kernelCacheDir $container->getParameter('kernel.cache_dir');
  22.         $container->addCompilerPass(
  23.             new DoctrineDBALTypesPass($kernelCacheDir '/elao_enum_doctrine_dbal_types.php')
  24.         );
  25.         $container->addCompilerPass(
  26.             new DoctrineODMTypesPass($kernelCacheDir '/elao_enum_doctrine_odm_types.php')
  27.         );
  28.     }
  29.     public function getPath(): string
  30.     {
  31.         return \dirname(__DIR__);
  32.     }
  33. }