snapshot_data implements JsonSerializable
Read onlyYes
Value Object: Snapshot Data.
Encapsulates the full state of an item at a specific point in time. Corresponds to 'middag_eventsnapshot'.
Table of Contents
Interfaces
- JsonSerializable
Properties
Methods
- __construct() : mixed
- from_json() : self
- Create from a JSON string (Database hydration).
- from_payload() : self
- Create from an existing object or array.
- get_encoded() : string
- Encode the snapshot data as JSON string.
- jsonSerialize() : array<string|int, mixed>
- Serialize the snapshot for JSON contexts.
Properties
$data
public
array<string|int, mixed>
$data
$format
public
string
$format
= 'json'
Methods
__construct()
public
__construct(array<string, mixed> $data[, string $format = 'json' ]) : mixed
Parameters
- $data : array<string, mixed>
- $format : string = 'json'
from_json()
Create from a JSON string (Database hydration).
public
static from_json(string $json) : self
Parameters
- $json : string
Return values
selffrom_payload()
Create from an existing object or array.
public
static from_payload(mixed $payload) : self
Parameters
- $payload : mixed
Return values
selfget_encoded()
Encode the snapshot data as JSON string.
public
get_encoded() : string
Return values
stringjsonSerialize()
Serialize the snapshot for JSON contexts.
public
jsonSerialize() : array<string|int, mixed>