/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
lib/internal/Magento/Framework/MessageQueue/Publisher/Config.php
55 строк
1 KB
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 17:47
22 окт 2025, 17:47
1b769b7
Код
Авторство
О чём код?
<?php /** * Copyright 2018 Adobe * All Rights Reserved. */ namespace Magento\Framework\MessageQueue\Publisher; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Phrase; use \Magento\Framework\MessageQueue\Publisher\Config\PublisherConfigItem\Iterator; /** * Publisher config provides access data declared in etc/queue_publisher.xml */ class Config implements ConfigInterface { /** * Publisher config data iterator. * * @var Iterator */ private $iterator; /** * Initialize dependencies. * * @param Iterator $iterator */ public function __construct(Iterator $iterator) { $this->iterator = $iterator; } /** * {@inheritdoc} */ public function getPublisher($topic) { $publisher = $this->iterator[$topic]; if (!$publisher) { throw new LocalizedException( new Phrase("Publisher '%publisher' is not declared.", ['publisher' => $topic]) ); } return $publisher; } /** * {@inheritdoc} */ public function getPublishers() { return $this->iterator; } }