예제 #1
0
 /**
  * @return bool
  *
  * Return true if the ExchangeInterface::setException() is called, or if one of in/out MessageInterface::isFault()
  * is true.
  */
 public function isFailed() : bool
 {
     return null !== $this->exception || $this->in->isFault() || $this->hasOut() && $this->out->isFault();
 }
예제 #2
0
 /**
  * @param MessageInterface $message
  * @return void
  *
  * Copy $message contents in $this.
  */
 public function copyFromMessage(MessageInterface $message)
 {
     $this->clearAttachments();
     $this->clearHeaders();
     $this->exchange = $message->getExchange();
     $this->setMessageId($message->getMessageId());
     $this->setHeaders($message->getHeaders());
     $this->setBody($message->getBody());
     $this->setFault($message->isFault());
 }