コード例 #1
0
ファイル: EmitterIterator.php プロジェクト: mrxotey/icicle
 /**
  * {@inheritdoc}
  */
 public function getReturn()
 {
     if (null === $this->placeholder || null !== $this->awaitable) {
         throw new UninitializedError('wait() must be called before calling this method.');
     }
     if (!$this->complete) {
         throw new IncompleteError('The observable has not completed.');
     }
     if ($this->queue->isFailed()) {
         throw $this->current;
     }
     return $this->current;
 }
コード例 #2
0
ファイル: Emitter.php プロジェクト: mrxotey/icicle
 /**
  * {@inheritdoc}
  */
 public function isFailed() : bool
 {
     return $this->queue->isFailed();
 }