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; } }