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
framework-message-queue
Config
Reader
Env.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\MessageQueue\Config\Reader
;
7
8
use
Magento\Framework\App\DeploymentConfig
;
9
use
Magento\Framework\MessageQueue\Config\Reader\Env\Converter\Publisher
as PublisherConverter;
10
use
Magento\Framework\App\ObjectManager
;
11
15
class
Env
implements
\Magento\Framework\Config\ReaderInterface
16
{
17
const
ENV_QUEUE
=
'queue'
;
18
const
ENV_PUBLISHERS
=
'publishers'
;
19
const
ENV_TOPICS
=
'topics'
;
20
const
ENV_CONSUMERS
=
'consumers'
;
21
const
ENV_CONSUMER_CONNECTION
=
'connection'
;
22
const
ENV_CONSUMER_MAX_MESSAGES
=
'max_messages'
;
23
27
private
$deploymentConfig;
28
32
private
$publisherConverter;
33
38
public
function
__construct
(
39
DeploymentConfig
$deploymentConfig,
40
PublisherConverter $publisherConverter =
null
41
) {
42
$this->deploymentConfig =
$deploymentConfig
;
43
$this->publisherConverter = $publisherConverter ?:
ObjectManager::getInstance
()->get(PublisherConverter::class);
44
}
45
53
public
function
read
($scope =
null
)
54
{
55
$configData
= $this->deploymentConfig->getConfigData(self::ENV_QUEUE) ?: [];
56
if
(isset(
$configData
[
'config'
])) {
57
$configData
= $this->publisherConverter->convert(
$configData
=
$configData
[
'config'
]);
58
}
59
return
$configData
;
60
}
61
}
Magento\Framework\MessageQueue\Config\Reader\Env\ENV_QUEUE
const ENV_QUEUE
Definition:
Env.php:17
Magento\Framework\App\ObjectManager\getInstance
static getInstance()
Definition:
ObjectManager.php:33
Magento\Framework\MessageQueue\Config\Reader\Env\ENV_TOPICS
const ENV_TOPICS
Definition:
Env.php:19
Magento\Framework\MessageQueue\Config\Reader\Env\ENV_CONSUMER_MAX_MESSAGES
const ENV_CONSUMER_MAX_MESSAGES
Definition:
Env.php:22
Magento\Framework\MessageQueue\Config\Reader
Magento\Framework\MessageQueue\Config\Reader\Env\read
read($scope=null)
Definition:
Env.php:53
Magento\Framework\MessageQueue\Config\Reader\Env\ENV_CONSUMERS
const ENV_CONSUMERS
Definition:
Env.php:20
Magento\Framework\App\DeploymentConfig
Definition:
DeploymentConfig.php:17
Magento\Framework\MessageQueue\Config\Reader\Env\__construct
__construct(DeploymentConfig $deploymentConfig, PublisherConverter $publisherConverter=null)
Definition:
Env.php:38
$deploymentConfig
$deploymentConfig
Definition:
health_check.php:18
Magento\Framework\Config\ReaderInterface
Definition:
ReaderInterface.php:16
Magento\Framework\App\ObjectManager
Definition:
ConfigCache.php:8
$configData
$configData
Definition:
payment_configuration.php:26
Magento\Framework\MessageQueue\Config\Reader\Env\ENV_CONSUMER_CONNECTION
const ENV_CONSUMER_CONNECTION
Definition:
Env.php:21
Magento\Framework\MessageQueue\Config\Reader\Env\Converter\Publisher
Definition:
Publisher.php:12
Magento\Framework\MessageQueue\Config\Reader\Env\ENV_PUBLISHERS
const ENV_PUBLISHERS
Definition:
Env.php:18
Magento\Framework\MessageQueue\Config\Reader\Env
Definition:
Env.php:15
Magento\Framework\App\DeploymentConfig
Definition:
CommentParser.php:6