MIDDAG for Moodle

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

$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_encoded()  : string
Encode the snapshot data as JSON 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) : self
Parameters
$json : string
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_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