Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Config.php
Go to the documentation of this file.
1 <?php
8 
13 
17 class Config implements ConfigInterface
18 {
24  private $exchangeIterator;
25 
31  private $queueIterator;
32 
39  public function __construct(ExchangeIterator $exchangeIterator, QueueIterator $queueIterator)
40  {
41  $this->exchangeIterator = $exchangeIterator;
42  $this->queueIterator = $queueIterator;
43  }
44 
48  public function getExchange($name, $connection)
49  {
50  $topology = $this->exchangeIterator[$name . '--' . $connection];
51  if (!$topology) {
52  throw new LocalizedException(
53  new Phrase(
54  'The "%exchange" exchange is not declared for the "%connection" connection. Verify and try again.',
55  [
56  'exchange' => $name,
57  'connection' => $connection
58  ]
59  )
60  );
61  }
62  return $topology;
63  }
64 
68  public function getExchanges()
69  {
70  return $this->exchangeIterator;
71  }
72 
76  public function getQueues()
77  {
78  return $this->queueIterator;
79  }
80 }
__construct(ExchangeIterator $exchangeIterator, QueueIterator $queueIterator)
Definition: Config.php:39
$connection
Definition: bulk.php:13
if(!isset($_GET['name'])) $name
Definition: log.php:14