0 follower

Interface Yiisoft\Queue\Message\Serializer\MessageEncoderInterface

Implemented byYiisoft\Queue\Message\Serializer\JsonMessageEncoder

Encodes and decodes a data array to and from a string.

Public Methods

Hide inherited methods

Method Description Defined By
decode() Decodes a string representation back into a value. Yiisoft\Queue\Message\Serializer\MessageEncoderInterface
encode() Encodes a data array into a string representation. Yiisoft\Queue\Message\Serializer\MessageEncoderInterface

Method Details

Hide inherited methods

decode() public abstract method

Decodes a string representation back into a value.

public abstract mixed decode ( string $value )
$value string

Encoded string.

return mixed

Decoded data.

throws Yiisoft\Queue\Message\Serializer\MessageSerializerException

If decoding fails.

                public function decode(string $value): mixed;

            
encode() public abstract method

Encodes a data array into a string representation.

public abstract string encode ( array $data )
$data array

Data to encode. Contains only scalars, nulls, and arrays — no objects or resources including array contents.

throws Yiisoft\Queue\Message\Serializer\MessageSerializerException

If encoding fails.

                public function encode(array $data): string;