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
Response
HandlerChain.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Payment\Gateway\Response
;
7
8
use
Magento\Framework\ObjectManager\TMap
;
9
use
Magento\Framework\ObjectManager\TMapFactory
;
10
17
class
HandlerChain
implements
HandlerInterface
18
{
22
private
$handlers;
23
28
public
function
__construct
(
29
TMapFactory
$tmapFactory,
30
array $handlers = []
31
) {
32
$this->handlers = $tmapFactory->
create
(
33
[
34
'array'
=> $handlers,
35
'type'
=> HandlerInterface::class
36
]
37
);
38
}
39
47
public
function
handle
(array $handlingSubject, array
$response
)
48
{
49
foreach
($this->handlers as
$handler
) {
50
// @TODO implement exceptions catching
51
$handler
->handle($handlingSubject,
$response
);
52
}
53
}
54
}
$response
$response
Definition:
404.php:11
Magento\Framework\ObjectManager\TMapFactory\create
create(array $args)
Definition:
TMapFactory.php:33
Magento\Payment\Gateway\Response\HandlerChain\__construct
__construct(TMapFactory $tmapFactory, array $handlers=[])
Definition:
HandlerChain.php:28
Magento\Payment\Gateway\Response\HandlerInterface
Definition:
HandlerInterface.php:14
Magento\Framework\ObjectManager\TMapFactory
Definition:
TMapFactory.php:13
Magento\Framework\ObjectManager\TMap
Definition:
TMap.php:14
Magento\Payment\Gateway\Response\HandlerChain\handle
handle(array $handlingSubject, array $response)
Definition:
HandlerChain.php:47
Magento\Payment\Gateway\Response\HandlerChain
Definition:
HandlerChain.php:17
Magento\Payment\Gateway\Response
Definition:
HandlerChain.php:6
$handler
catch(\Exception $e) $handler
Definition:
index.php:30