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
Request
BuilderComposite.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Payment\Gateway\Request
;
7
8
use
Magento\Framework\ObjectManager\TMap
;
9
use
Magento\Framework\ObjectManager\TMapFactory
;
10
16
class
BuilderComposite
implements
BuilderInterface
17
{
21
private
$builders;
22
27
public
function
__construct
(
28
TMapFactory
$tmapFactory,
29
array $builders = []
30
) {
31
$this->builders = $tmapFactory->
create
(
32
[
33
'array'
=> $builders,
34
'type'
=> BuilderInterface::class
35
]
36
);
37
}
38
45
public
function
build
(array $buildSubject)
46
{
47
$result
= [];
48
foreach
($this->builders as $builder) {
49
// @TODO implement exceptions catching
50
$result
= $this->
merge
(
$result
, $builder->build($buildSubject));
51
}
52
53
return
$result
;
54
}
55
63
protected
function
merge
(array
$result
, array $builder)
64
{
65
return
array_replace_recursive(
$result
, $builder);
66
}
67
}
$result
$result
Definition:
product_configurable_not_available_rollback.php:26
Magento\Payment\Gateway\Request\BuilderComposite
Definition:
BuilderComposite.php:16
Magento\Framework\ObjectManager\TMapFactory\create
create(array $args)
Definition:
TMapFactory.php:33
Magento\Payment\Gateway\Request\BuilderComposite\build
build(array $buildSubject)
Definition:
BuilderComposite.php:45
Magento\Payment\Gateway\Request\BuilderInterface
Definition:
BuilderInterface.php:14
Magento\Payment\Gateway\Request
Definition:
BuilderComposite.php:6
Magento\Framework\ObjectManager\TMapFactory
Definition:
TMapFactory.php:13
Magento\Payment\Gateway\Request\BuilderComposite\merge
merge(array $result, array $builder)
Definition:
BuilderComposite.php:63
Magento\Framework\ObjectManager\TMap
Definition:
TMap.php:14
Magento\Payment\Gateway\Request\BuilderComposite\__construct
__construct(TMapFactory $tmapFactory, array $builders=[])
Definition:
BuilderComposite.php:27