0 follower

Interface Yiisoft\Queue\Message\Serializer\MessageSerializerInterface

Implemented byYiisoft\Queue\Message\Serializer\MessageSerializer

Serializes and unserializes queue messages to and from a string representation.

Public Methods

Hide inherited methods

Method Description Defined By
serialize() Serializes a message to a string. Yiisoft\Queue\Message\Serializer\MessageSerializerInterface
unserialize() Unserializes a message from a string. Yiisoft\Queue\Message\Serializer\MessageSerializerInterface

Method Details

Hide inherited methods

serialize() public abstract method

Serializes a message to a string.

public abstract string serialize ( Yiisoft\Queue\Message\MessageInterface $message )
$message Yiisoft\Queue\Message\MessageInterface

Message to serialize.

throws Yiisoft\Queue\Message\Serializer\MessageSerializerException

If serialization fails.

                public function serialize(MessageInterface $message): string;

            
unserialize() public abstract method

Unserializes a message from a string.

public abstract Yiisoft\Queue\Message\MessageInterface unserialize ( string $value )
$value string

Encoded message string.

throws Yiisoft\Queue\Message\Serializer\MessageSerializerException

If unserialization fails.

                public function unserialize(string $value): MessageInterface;