MIDDAG for Moodle

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

$data  : array<string|int, mixed>
$format  : string

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

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
self

from_payload()

Create from an existing object or array.

public static from_payload(mixed $payload) : self
Parameters
$payload : mixed
Return values
self

get_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
string

jsonSerialize()

Serialize the snapshot for JSON contexts.

public jsonSerialize() : array<string|int, mixed>
Tags
noinspection

PhpMethodNamingConventionInspection

Return values
array<string|int, mixed>

        
On this page

Search results