for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Yiisoft\Queue\Message;
trait EnvelopeTrait
{
private MessageInterface $message;
public function getMessage(): MessageInterface
return $this->message;
}
public function withMessage(MessageInterface $message): self
$instance = clone $this;
$instance->message = $message;
return $instance;
public function getHandler(): string
return $this->message->getHandler();
public function getData(): mixed
return $this->message->getData();
public function getMetadata(): array
return $this->message->getMetadata();