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-analytics
Model
Connector.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Analytics\Model
;
7
8
use
Magento\Framework\Exception\NotFoundException
;
9
use
Magento\Framework\ObjectManagerInterface
;
10
16
class
Connector
17
{
27
private
$commands;
28
32
private
$objectManager;
33
38
public
function
__construct
(
39
array $commands,
40
ObjectManagerInterface
$objectManager
41
) {
42
$this->commands = $commands;
43
$this->objectManager =
$objectManager
;
44
}
45
53
public
function
execute($commandName)
54
{
55
if
(!array_key_exists($commandName, $this->commands)) {
56
throw
new
NotFoundException
(
__
(
'Command was not found.'
));
57
}
58
60
$command = $this->objectManager->create($this->commands[$commandName]);
61
62
return
$command->execute();
63
}
64
}
$objectManager
$objectManager
Definition:
bootstrap.php:17
Magento\Framework\ObjectManagerInterface
Definition:
ObjectManagerInterface.php:12
Magento\Analytics\Model\Connector
Definition:
Connector.php:16
__
__()
Definition:
__.php:13
Magento\Analytics\Model
Magento\Framework\Exception\NotFoundException
Definition:
NotFoundException.php:12
Magento\Analytics\Model\Connector\__construct
__construct(array $commands, ObjectManagerInterface $objectManager)
Definition:
Connector.php:38