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-braintree
Model
Report
ConditionAppliers
AppliersPool.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Braintree\Model\Report\ConditionAppliers
;
7
11
class
AppliersPool
12
{
16
private
$appliersPool = [];
17
22
public
function
__construct
(array $appliers)
23
{
24
$this->appliersPool = $appliers;
25
$this->checkAppliers();
26
}
27
33
private
function
checkAppliers()
34
{
35
foreach
($this->appliersPool as $applier) {
36
if
(!($applier instanceof
ApplierInterface
)) {
37
throw
new \InvalidArgumentException(
'Report filter applier must implement ApplierInterface'
);
38
}
39
}
40
return
true
;
41
}
42
48
public
function
getApplier
($filter)
49
{
50
if
(is_object($filter)) {
51
$filterClass = get_class($filter);
52
if
(array_key_exists($filterClass, $this->appliersPool)) {
53
return
$this->appliersPool[$filterClass];
54
}
55
}
56
return
null
;
57
}
58
}
Magento\Braintree\Model\Report\ConditionAppliers\AppliersPool\__construct
__construct(array $appliers)
Definition:
AppliersPool.php:22
Magento\Braintree\Model\Report\ConditionAppliers\AppliersPool
Definition:
AppliersPool.php:11
Magento\Braintree\Model\Report\ConditionAppliers\AppliersPool\getApplier
getApplier($filter)
Definition:
AppliersPool.php:48
Magento\Braintree\Model\Report\ConditionAppliers
Definition:
ApplierInterface.php:6
Magento\Braintree\Model\Report\ConditionAppliers\ApplierInterface
Definition:
ApplierInterface.php:11