/** * {@inheritdoc} */ public function getIterator() { foreach (parent::getIterator() as $key => $message) { if ($message instanceof MessageInterface) { $message = $this->service->getNotification($message); } (yield $key => $message); } }
/** * {@inheritdoc} */ public function getIterator() { foreach (parent::getIterator() as $key => $value) { if ($value instanceof ChannelInterface) { $value = new Thread($this->service, $value); } (yield $key => $value); } }