class audit_snapshot implements audit_snapshot_interface, JsonSerializable

Value Object: Audit Snapshot.

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

Methods

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

No description

static audit_snapshot
from_json(string $json, string $format = 'json')

Create from a JSON string (Database hydration).

static audit_snapshot
from_payload(mixed $payload)

Create from an existing object or array.

string
get_encoded()

Encode the snapshot data as JSON string.

array
get_data()

No description

string
get_format()

No description

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 48
static audit_snapshot from_json(string $json, string $format = 'json')

Create from a JSON string (Database hydration).

Parameters

string $json
string $format

Return Value

audit_snapshot

at line 67
static audit_snapshot from_payload(mixed $payload)

Create from an existing object or array.

Parameters

mixed $payload

Return Value

audit_snapshot

at line 83
string get_encoded()

Encode the snapshot data as JSON string.

Return Value

string

at line 93
array get_data()

No description

Return Value

array

at line 98
string get_format()

No description

Return Value

string

at line 108
array jsonSerialize()

Serialize the snapshot for JSON contexts.

Return Value

array