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
Command
CommandManagerPool.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Payment\Gateway\Command
;
7
8
use
Magento\Framework\Exception\NotFoundException
;
9
use
Magento\Framework\ObjectManager\TMap
;
10
use
Magento\Framework\ObjectManager\TMapFactory
;
11
18
class
CommandManagerPool
implements
CommandManagerPoolInterface
19
{
23
private
$executors;
24
29
public
function
__construct
(
30
TMapFactory
$tmapFactory,
31
array $executors = []
32
) {
33
$this->executors = $tmapFactory->
createSharedObjectsMap
(
34
[
35
'array'
=> $executors,
36
'type'
=> CommandManagerInterface::class
37
]
38
);
39
}
40
49
public
function
get
($paymentProviderCode)
50
{
51
if
(!isset($this->executors[$paymentProviderCode])) {
52
throw
new
NotFoundException
(
53
__
(
'The "%1" command executor isn\'t defined. Verify the executor and try again.'
, $paymentProviderCode)
54
);
55
}
56
57
return
$this->executors[$paymentProviderCode];
58
}
59
}
Magento\Payment\Gateway\Command\CommandManagerPool\__construct
__construct(TMapFactory $tmapFactory, array $executors=[])
Definition:
CommandManagerPool.php:29
__
__()
Definition:
__.php:13
Magento\Payment\Gateway\Command
Definition:
CommandException.php:6
Magento\Framework\Exception\NotFoundException
Definition:
NotFoundException.php:12
Magento\Framework\ObjectManager\TMapFactory
Definition:
TMapFactory.php:13
Magento\Payment\Gateway\Command\CommandManagerPoolInterface
Definition:
CommandManagerPoolInterface.php:16
Magento\Framework\ObjectManager\TMap
Definition:
TMap.php:14
Magento\Framework\ObjectManager\TMapFactory\createSharedObjectsMap
createSharedObjectsMap(array $args)
Definition:
TMapFactory.php:42
Magento\Payment\Gateway\Command\CommandManagerPool
Definition:
CommandManagerPool.php:18