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

Open in your IDE?
  1. <?php
  2. /**
  3.  * CoreShop.
  4.  *
  5.  * This source file is subject to the GNU General Public License version 3 (GPLv3)
  6.  * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
  7.  * files that are distributed with this source code.
  8.  *
  9.  * @copyright  Copyright (c) 2015-2020 Dominik Pfaffenbauer (https://www.pfaffenbauer.at)
  10.  * @license    https://www.coreshop.org/license     GNU General Public License version 3 (GPLv3)
  11.  */
  12. namespace CoreShop\Bundle\RuleBundle;
  13. use CoreShop\Bundle\ResourceBundle\AbstractResourceBundle;
  14. use CoreShop\Bundle\ResourceBundle\CoreShopResourceBundle;
  15. use CoreShop\Bundle\RuleBundle\DependencyInjection\Compiler\RuleAvailabilityAssessorPass;
  16. use CoreShop\Bundle\RuleBundle\DependencyInjection\Compiler\TraceableValidationProcessorPass;
  17. use Symfony\Component\DependencyInjection\ContainerBuilder;
  18. final class CoreShopRuleBundle extends AbstractResourceBundle
  19. {
  20.     /**
  21.      * {@inheritdoc}
  22.      */
  23.     public function getSupportedDrivers()
  24.     {
  25.         return [
  26.             CoreShopResourceBundle::DRIVER_DOCTRINE_ORM,
  27.         ];
  28.     }
  29.     /**
  30.      * {@inheritdoc}
  31.      */
  32.     public function build(ContainerBuilder $container)
  33.     {
  34.         parent::build($container);
  35.         $container->addCompilerPass(new TraceableValidationProcessorPass());
  36.         $container->addCompilerPass(new RuleAvailabilityAssessorPass());
  37.     }
  38.     /**
  39.      * {@inheritdoc}
  40.      */
  41.     protected function getModelNamespace()
  42.     {
  43.         return 'CoreShop\Component\Rule\Model';
  44.     }
  45. }