iterator = $iterator; } /** * {@inheritdoc} */ public function getConsumer($name) { $consumer = $this->iterator[$name]; if (!$consumer) { throw new LocalizedException(new Phrase("Consumer '%consumer' is not declared.", ['consumer' => $name])); } return $consumer; } /** * {@inheritdoc} */ public function getConsumers() { return $this->iterator; } }