<?php
/**
* CoreShop.
*
* This source file is subject to the GNU General Public License version 3 (GPLv3)
* For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
* files that are distributed with this source code.
*
* @copyright Copyright (c) 2015-2020 Dominik Pfaffenbauer (https://www.pfaffenbauer.at)
* @license https://www.coreshop.org/license GNU General Public License version 3 (GPLv3)
*/
namespace CoreShop\Bundle\RuleBundle;
use CoreShop\Bundle\ResourceBundle\AbstractResourceBundle;
use CoreShop\Bundle\ResourceBundle\CoreShopResourceBundle;
use CoreShop\Bundle\RuleBundle\DependencyInjection\Compiler\RuleAvailabilityAssessorPass;
use CoreShop\Bundle\RuleBundle\DependencyInjection\Compiler\TraceableValidationProcessorPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
final class CoreShopRuleBundle extends AbstractResourceBundle
{
/**
* {@inheritdoc}
*/
public function getSupportedDrivers()
{
return [
CoreShopResourceBundle::DRIVER_DOCTRINE_ORM,
];
}
/**
* {@inheritdoc}
*/
public function build(ContainerBuilder $container)
{
parent::build($container);
$container->addCompilerPass(new TraceableValidationProcessorPass());
$container->addCompilerPass(new RuleAvailabilityAssessorPass());
}
/**
* {@inheritdoc}
*/
protected function getModelNamespace()
{
return 'CoreShop\Component\Rule\Model';
}
}