0 follower

Final Class Yiisoft\Queue\Message\Message

InheritanceYiisoft\Queue\Message\Message
ImplementsYiisoft\Queue\Message\MessageInterface

Method Details

Hide inherited methods

__construct() public method

public mixed __construct ( string $handlerName, mixed $data, array $metadata = [] )
$handlerName string

A name of a handler which should handle this message.

$data mixed

Message data, encodable by a queue adapter

$metadata array

Message metadata, encodable by a queue adapter

                public function __construct(
    private readonly string $handlerName,
    private readonly mixed $data,
    private array $metadata = [],
) {
}

            
fromData() public static method

public static Yiisoft\Queue\Message\MessageInterface fromData ( string $handlerName, mixed $data, array $metadata = [] )
$handlerName string
$data mixed
$metadata array

                public static function fromData(string $handlerName, mixed $data, array $metadata = []): MessageInterface
{
    return new self($handlerName, $data, $metadata);
}

            
getData() public method

public mixed getData ( )

                public function getData(): mixed
{
    return $this->data;
}

            
getHandlerName() public method

public string getHandlerName ( )

                public function getHandlerName(): string
{
    return $this->handlerName;
}

            
getMetadata() public method

public array getMetadata ( )

                public function getMetadata(): array
{
    return $this->metadata;
}