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