RawJsonTranscoder
in package
implements
Transcoder
Interfaces, Classes, Traits and Enums
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
$instance
private
static RawJsonTranscoder|null
$instance
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
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
Return values
array<string|int, mixed> —tuple of encoded value with flags for network layer
getInstance()
public
static getInstance() : Transcoder