final class ZoneChangeRequestRowCodec (View source)

The row shapes stored inside a change request's actions. They are a data contract: requests filed by earlier versions are decoded by this class, so the keys and their types stay as they are.

Methods

static array
afterState(array $row)

The "after" state of an add or edit action from a normalised editor row.

static array
snapshot(array $record, string $zoneName)

The "before" state of an edit or delete action, in the change log's snapshot shape.

static ZoneEditRow
rowFromAfter(int|string $recordId, array $after)

A stored "after" state as the editor row to replay against the record it names.

Details

static array afterState(array $row)

The "after" state of an add or edit action from a normalised editor row.

Parameters

array $row

name, type, content, ttl, prio, disabled (0/1) and comment

Return Value

array

static array snapshot(array $record, string $zoneName)

The "before" state of an edit or delete action, in the change log's snapshot shape.

Parameters

array $record

The stored row

string $zoneName

Return Value

array

static ZoneEditRow rowFromAfter(int|string $recordId, array $after)

A stored "after" state as the editor row to replay against the record it names.

Parameters

int|string $recordId
array $after

Return Value

ZoneEditRow