body = $body; $this->headers = $headers; $this->properties = $properties; $this->scope = static::SCOPE_MESSAGE_BUS; } /** * @return string|null */ public function getBody() { return $this->body; } /** * @param string|int|float|array|\JsonSerializable|null $body */ public function setBody($body) { $this->body = $body; } /** * @return string|null */ public function getContentType() { return $this->contentType; } /** * @param string|null $contentType */ public function setContentType($contentType) { $this->contentType = $contentType; } /** * @return string */ public function getMessageId() { return $this->messageId; } /** * @param string $messageId */ public function setMessageId($messageId) { $this->messageId = $messageId; } /** * @return int */ public function getTimestamp() { return $this->timestamp; } /** * @param int $timestamp */ public function setTimestamp($timestamp) { $this->timestamp = $timestamp; } /** * @return string */ public function getPriority() { return $this->priority; } /** * @param string $priority */ public function setPriority($priority) { $this->priority = $priority; } /** * Gets the number of seconds the message should be removed from the queue without processing. * * @return int|null */ public function getExpire() { return $this->expire; } /** * @param int|null $expire */ public function setExpire($expire) { $this->expire = $expire; } /** * Gets the number of seconds the message should be delayed before it will be send to a queue. * * @return int|null */ public function getDelay() { return $this->delay; } /** * Set delay in seconds. * * @param int|null $delay */ public function setDelay($delay) { $this->delay = $delay; } public function setScope(string $scope): void { $this->scope = $scope; } public function getScope(): string { return $this->scope; } /** * @return string */ public function getReplyTo() { return $this->replyTo; } /** * @param string $replyTo */ public function setReplyTo($replyTo) { $this->replyTo = $replyTo; } /** * @return string */ public function getCorrelationId() { return $this->correlationId; } /** * @param string $correlationId */ public function setCorrelationId($correlationId) { $this->correlationId = $correlationId; } /** * @return array */ public function getHeaders() { return $this->headers; } /** * @param string $name * @param mixed|null $default */ public function getHeader($name, $default = null) { return array_key_exists($name, $this->headers) ? $this->headers[$name] : $default; } /** * @param string $name */ public function setHeader($name, $value) { $this->headers[$name] = $value; } public function setHeaders(array $headers) { $this->headers = $headers; } /** * @return array */ public function getProperties() { return $this->properties; } public function setProperties(array $properties) { $this->properties = $properties; } /** * @param string $name * @param mixed|null $default */ public function getProperty($name, $default = null) { return array_key_exists($name, $this->properties) ? $this->properties[$name] : $default; } /** * @param string $name */ public function setProperty($name, $value) { $this->properties[$name] = $value; } }