audit_snapshot implements audit_snapshot_interface, JsonSerializable
Read onlyYes
Value Object: Audit Snapshot.
Encapsulates the full state of an item at a specific point in time.
Corresponds to middag_audit_snapshot.
Table of Contents
Interfaces
- audit_snapshot_interface
- Contract for one audit snapshot row (`middag_audit_snapshot`).
- 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_data() : array<string, mixed>
- get_encoded() : string
- Encode the snapshot data as JSON string.
- get_format() : 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[, string $format = 'json' ]) : self
Parameters
- $json : string
- $format : string = 'json'
Return values
selffrom_payload()
Create from an existing object or array.
public
static from_payload(mixed $payload) : self
Parameters
- $payload : mixed
Return values
selfget_data()
public
get_data() : array<string, mixed>
Return values
array<string, mixed>get_encoded()
Encode the snapshot data as JSON string.
public
get_encoded() : string
Return values
stringget_format()
public
get_format() : string
Return values
stringjsonSerialize()
Serialize the snapshot for JSON contexts.
public
jsonSerialize() : array<string|int, mixed>