Abstract Class Yiisoft\Queue\Message\Message
| Inheritance | Yiisoft\Queue\Message\Message |
|---|---|
| Implements | Yiisoft\Queue\Message\MessageInterface |
| Subclasses | Yiisoft\Queue\Message\GenericMessage |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| fromData() | Creates a new message instance from the given type and payload data. | Yiisoft\Queue\Message\MessageInterface |
| getData() | Returns payload data. | Yiisoft\Queue\Message\MessageInterface |
| getMetadata() | Yiisoft\Queue\Message\Message | |
| getType() | Returns message type. | Yiisoft\Queue\Message\MessageInterface |
| withMetadata() | Yiisoft\Queue\Message\Message |
Method Details
Defined in: Yiisoft\Queue\Message\MessageInterface::fromData()
Creates a new message instance from the given type and payload data.
| public abstract static self fromData ( string $type, boolean|integer|float|string|array|null $data ) | ||
| $type | string |
Message type. |
| $data | boolean|integer|float|string|array|null |
Message payload data. Must contain only |
public static function fromData(string $type, bool|int|float|string|array|null $data): self;
Defined in: Yiisoft\Queue\Message\MessageInterface::getData()
Returns payload data.
| public abstract boolean|integer|float|string|array|null getData ( ) | ||
| return | boolean|integer|float|string|array|null |
Payload data containing only |
|---|---|---|
public function getData(): bool|int|float|string|array|null;
Defined in: Yiisoft\Queue\Message\MessageInterface::getType()
Returns message type.
| public abstract string getType ( ) | ||
| return | string |
Message type. |
|---|---|---|
public function getType(): string;
| public static withMetadata ( array $metadata ) | ||
| $metadata | array | |
final public function withMetadata(array $metadata): static
{
$new = clone $this;
$new->metadata = $metadata;
return $new;
}
Signup or Login in order to comment.