class snapshot_data implements JsonSerializable

Value Object: Snapshot Data.

Encapsulates the full state of an item at a specific point in time. Corresponds to 'middag_eventsnapshot'.

Methods

__construct(array $data, string $format = 'json')

No description

static snapshot_data
from_json(string $json)

Create from a JSON string (Database hydration).

static snapshot_data
from_payload(mixed $payload)

Create from an existing object or array.

string
get_encoded()

Encode the snapshot data as JSON string.

array
jsonSerialize()

Serialize the snapshot for JSON contexts.

Details

at line 35
__construct(array $data, string $format = 'json')

No description

Parameters

array $data
string $format

at line 47
static snapshot_data from_json(string $json)

Create from a JSON string (Database hydration).

Parameters

string $json

Return Value

snapshot_data

at line 64
static snapshot_data from_payload(mixed $payload)

Create from an existing object or array.

Parameters

mixed $payload

Return Value

snapshot_data

at line 80
string get_encoded()

Encode the snapshot data as JSON string.

Return Value

string

at line 90
array jsonSerialize()

Serialize the snapshot for JSON contexts.

Return Value

array