/** * @param object $message */ public function updateMessage($message) { Guard::againstNull('message', $message); Guard::againstNonObject('message', $message); $this->message = $message; $this->hasMessageChanged = true; }
/** * @param string $newBody */ public function replaceBody($newBody) { Guard::againstNull('body', $newBody); if ($this->originalBody === null) { $this->originalBody = $this->body; } $this->body = $newBody; }
/** * @param string $messageId * @param array $headers * @param string $body * @param ReceiveCancellationToken $cancellationToken * @param EndpointControlToken $endpointControlToken */ public function __construct($messageId, array $headers, $body, ReceiveCancellationToken $cancellationToken, EndpointControlToken $endpointControlToken) { Guard::againstNullAndEmpty('messageId', $messageId); Guard::againstNullAndEmpty('headers', $headers); Guard::againstNull('body', $body); $this->messageId = $messageId; $this->headers = $headers; $this->body = $body; $this->cancellationToken = $cancellationToken; $this->endpointControlToken = $endpointControlToken; }
/** * @param string $newBody */ public function replaceBody($newBody) { Guard::againstNull('body', $newBody); $this->body = $newBody; }