Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-payment
Gateway
Validator
ValidatorPool.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Payment\Gateway\Validator
;
8
9
use
Magento\Framework\Exception\NotFoundException
;
10
use
Magento\Framework\ObjectManager\TMap
;
11
use
Magento\Framework\ObjectManager\TMapFactory
;
12
19
class
ValidatorPool
implements
\Magento\Payment\Gateway\Validator\ValidatorPoolInterface
20
{
24
private
$validators;
25
30
public
function
__construct
(
31
TMapFactory
$tmapFactory,
32
array $validators = []
33
) {
34
$this->validators = $tmapFactory->
create
(
35
[
36
'array'
=> $validators,
37
'type'
=> ValidatorInterface::class
38
]
39
);
40
}
41
49
public
function
get
(
$code
)
50
{
51
if
(!isset($this->validators[
$code
])) {
52
throw
new
NotFoundException
(
__
(
'The validator for the "%1" field doesn\'t exist.'
,
$code
));
53
}
54
55
return
$this->validators[
$code
];
56
}
57
}
Magento\Payment\Gateway\Validator\ValidatorPool\__construct
__construct(TMapFactory $tmapFactory, array $validators=[])
Definition:
ValidatorPool.php:30
Magento\Payment\Gateway\Validator\ValidatorPoolInterface
Definition:
ValidatorPoolInterface.php:16
Magento\Framework\ObjectManager\TMapFactory\create
create(array $args)
Definition:
TMapFactory.php:33
__
__()
Definition:
__.php:13
Magento\Framework\Exception\NotFoundException
Definition:
NotFoundException.php:12
Magento\Framework\ObjectManager\TMapFactory
Definition:
TMapFactory.php:13
Magento\Framework\ObjectManager\TMap
Definition:
TMap.php:14
Magento\Payment\Gateway\Validator\ValidatorPool
Definition:
ValidatorPool.php:19
Magento\Payment\Gateway\Validator
Definition:
AbstractValidator.php:6
$code
$code
Definition:
info.phtml:12