JsonCodec
in package
implements
CodecInterface
FinalYes
Table of Contents
Interfaces
Properties
- $maxDepth : int
- $parser : Decoder
- $serializer : Encoder
Methods
- __construct() : mixed
- decode() : iterable<string|int, ServerRequestInterface|ServerResponseInterface>
- encode() : string
Properties
$maxDepth
private
int
$maxDepth
$parser
private
Decoder
$parser
$serializer
private
Encoder
$serializer
Methods
__construct()
public
__construct(DataConverterInterface $dataConverter[, int $maxDepth = 64 ]) : mixed
Parameters
- $dataConverter : DataConverterInterface
- $maxDepth : int = 64
decode()
public
decode(string $batch[, array<string|int, mixed> $headers = [] ]) : iterable<string|int, ServerRequestInterface|ServerResponseInterface>
Parameters
- $batch : string
- $headers : array<string|int, mixed> = []
Return values
iterable<string|int, ServerRequestInterface|ServerResponseInterface>encode()
public
encode(iterable<string|int, mixed> $commands) : string
Parameters
- $commands : iterable<string|int, mixed>