vendor/coreshop/rule-bundle/CoreShopRuleBundle.php line 27

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. /*
  4.  * CoreShop
  5.  *
  6.  * This source file is available under two different licenses:
  7.  *  - GNU General Public License version 3 (GPLv3)
  8.  *  - CoreShop Commercial License (CCL)
  9.  * Full copyright and license information is available in
  10.  * LICENSE.md which is distributed with this source code.
  11.  *
  12.  * @copyright  Copyright (c) CoreShop GmbH (https://www.coreshop.org)
  13.  * @license    https://www.coreshop.org/license     GPLv3 and CCL
  14.  *
  15.  */
  16. namespace CoreShop\Bundle\RuleBundle;
  17. use CoreShop\Bundle\ResourceBundle\AbstractResourceBundle;
  18. use CoreShop\Bundle\ResourceBundle\CoreShopResourceBundle;
  19. use CoreShop\Bundle\RuleBundle\DependencyInjection\Compiler\RuleAvailabilityAssessorPass;
  20. use CoreShop\Bundle\RuleBundle\DependencyInjection\Compiler\TraceableValidationProcessorPass;
  21. use Symfony\Component\DependencyInjection\ContainerBuilder;
  22. final class CoreShopRuleBundle extends AbstractResourceBundle
  23. {
  24.     public function getSupportedDrivers(): array
  25.     {
  26.         return [
  27.             CoreShopResourceBundle::DRIVER_DOCTRINE_ORM,
  28.         ];
  29.     }
  30.     public function build(ContainerBuilder $container): void
  31.     {
  32.         parent::build($container);
  33.         $container->addCompilerPass(new TraceableValidationProcessorPass());
  34.         $container->addCompilerPass(new RuleAvailabilityAssessorPass());
  35.     }
  36.     protected function getModelNamespace(): string
  37.     {
  38.         return 'CoreShop\Component\Rule\Model';
  39.     }
  40. }