Documentation

RawJsonTranscoder
in package
implements Transcoder

Interfaces, Classes, Traits and Enums

Transcoder

Table of Contents

$instance  : RawJsonTranscoder|null
decode()  : string
Just returns the body, assuming that decoding will be done later by the caller.
encode()  : array<string|int, mixed>
Assumes that input value is a string that already contains JSON-encoded object
getInstance()  : Transcoder

Properties

Methods

decode()

Just returns the body, assuming that decoding will be done later by the caller.

public decode(string $bytes, int $flags) : string
Parameters
$bytes : string

encoded data

$flags : int

flags from network layer, that describes format of the encoded data

Tags
since
4.0.0
Return values
string

decoded document

encode()

Assumes that input value is a string that already contains JSON-encoded object

public encode(string $value) : array<string|int, mixed>
Parameters
$value : string

document

Tags
since
4.0.0
Return values
array<string|int, mixed>

tuple of encoded value with flags for network layer


        

Search results