/** * @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(); }
/** * @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()); }