XdrDataValue
in package
Table of Contents
Methods
- __construct() : mixed
- decode() : XdrDataValue
- encode() : string
- fromBase64Xdr() : static
- fromJson() : static
- fromJsonValue() : static
- getValue() : string|null
- toBase64Xdr() : string
- toJson() : string
- toJsonValue() : mixed
- SEP-51 (XDR-JSON) emission for the DataValue typedef.
Methods
__construct()
public
__construct([string|null $value = null ]) : mixed
Parameters
- $value : string|null = null
decode()
public
static decode(XdrBuffer $xdr) : XdrDataValue
Parameters
- $xdr : XdrBuffer
Return values
XdrDataValueencode()
public
encode() : string
Return values
stringfromBase64Xdr()
public
static fromBase64Xdr(string $xdr) : static
Parameters
- $xdr : string
Return values
staticfromJson()
public
static fromJson(string $json) : static
Parameters
- $json : string
Tags
Return values
staticfromJsonValue()
public
static fromJsonValue(mixed $value) : static
Parameters
- $value : mixed
Return values
staticgetValue()
public
getValue() : string|null
Return values
string|nulltoBase64Xdr()
public
toBase64Xdr() : string
Return values
stringtoJson()
public
toJson() : string
Tags
Return values
stringtoJsonValue()
SEP-51 (XDR-JSON) emission for the DataValue typedef.
public
toJsonValue() : mixed
The XDR is typedef opaque DataValue<64>; per SEP-51 §Opaque the
variable-opaque wire form is a hex string. This PHP class is a
hand-written wrapper used for optional fields (e.g. ManageData
dataValue), so the value field is nullable; the SEP-51 to/from
methods preserve the null state by emitting JSON null when the
wrapper carries no bytes.
Mirrors the bare opaque-typedef emission (XdrJsonHelper::bytesToHex / hexToBytes), with an additional null guard for the optional wrapper semantics.