exchangeIterator = $exchangeIterator; $this->queueIterator = $queueIterator; } /** * {@inheritdoc} */ public function getExchange($name, $connection) { $topology = $this->exchangeIterator[$name . '--' . $connection]; if (!$topology) { throw new LocalizedException( new Phrase( 'The "%exchange" exchange is not declared for the "%connection" connection. Verify and try again.', [ 'exchange' => $name, 'connection' => $connection ] ) ); } return $topology; } /** * {@inheritdoc} */ public function getExchanges() { return $this->exchangeIterator; } /** * {@inheritdoc} */ public function getQueues() { return $this->queueIterator; } }