| Current Path : /var/www/clients/client3/web2/web/vendor/magento/module-sales-rule/Model/Validator/ |
| Current File : /var/www/clients/client3/web2/web/vendor/magento/module-sales-rule/Model/Validator/Pool.php |
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\SalesRule\Model\Validator;
/**
* Class Pool collects custom validators for items before SalesRules are applied
*/
class Pool
{
/**
* @var array
*/
protected $validators = [];
/**
* @param array $validators
*/
public function __construct(array $validators = [])
{
$this->validators = $validators;
}
/**
* Get Validators defined in di
*
* @param string $type
* @return array
*/
public function getValidators($type)
{
return isset($this->validators[$type]) ? $this->validators[$type] : [];
}
}