final class ZoneSummary implements ArrayAccess, JsonSerializable (View source)

One row of a zone list: the forward and reverse pages, the internal API list and the console listing.

Both the SQL and the API backend build it through fromRow(), so the key set the templates and the internal API see is defined once. Reading it as an array (zone['name'] in Twig, toArray() for JSON) yields the legacy column-keyed shape; the optional columns (serial, template, ...) appear only when the listing asked for them, as before.

Methods

__construct(int $id, string $name, string $utf8Name, string $type, int $recordCount, string $comment, bool $secured, array $owners, array $fullNames, ZoneSoaHealth|null $soaHealth = null, string|null $serial = null, string|null $signedSerial = null, string|null $template = null, int|null $notifiedSerial = null, bool|null $notifyPending = null, int|null $canonicalId = null)

No description

static ZoneSummary
fromRow(array $row)

Build from the column-keyed row a repository assembled: id, name, type, count_records, comment, secured, owners, full_names, and the optional soa_health, serial, signed_serial, template, notified_serial, notify_pending and canonical_id.

string|null
primaryOwner()

No description

array
toArray()

The column-keyed array the zone lists returned before this model existed.

array
jsonSerialize()

No description

bool
offsetExists(mixed $offset)

No description

mixed
offsetGet(mixed $offset)

No description

void
offsetSet(mixed $offset, mixed $value)

No description

void
offsetUnset(mixed $offset)

No description

Details

__construct(int $id, string $name, string $utf8Name, string $type, int $recordCount, string $comment, bool $secured, array $owners, array $fullNames, ZoneSoaHealth|null $soaHealth = null, string|null $serial = null, string|null $signedSerial = null, string|null $template = null, int|null $notifiedSerial = null, bool|null $notifyPending = null, int|null $canonicalId = null)

No description

Parameters

int $id
string $name
string $utf8Name
string $type
int $recordCount
string $comment
bool $secured
array $owners

Usernames of every owner, primary owner first

array $fullNames

Full name per owner, empty when the user has none

ZoneSoaHealth|null $soaHealth

Null when the listing does not carry health

string|null $serial

SOA serial, '' when unknown; null when not requested

string|null $signedSerial

DNSSEC-edited serial; null when not requested

string|null $template

Applied template name, '' when none; null when not requested

int|null $notifiedSerial

Serial last acknowledged by secondaries, API backend only

bool|null $notifyPending

Whether serial is ahead of notifiedSerial

int|null $canonicalId

The id the other endpoints key on, API backend internal list only

static ZoneSummary fromRow(array $row)

Build from the column-keyed row a repository assembled: id, name, type, count_records, comment, secured, owners, full_names, and the optional soa_health, serial, signed_serial, template, notified_serial, notify_pending and canonical_id.

Parameters

array $row

Return Value

ZoneSummary

string|null primaryOwner()

No description

Return Value

string|null

array toArray()

The column-keyed array the zone lists returned before this model existed.

Return Value

array

array jsonSerialize()

No description

Return Value

array

bool offsetExists(mixed $offset)

No description

Parameters

mixed $offset

Return Value

bool

mixed offsetGet(mixed $offset)

No description

Parameters

mixed $offset

Return Value

mixed

void offsetSet(mixed $offset, mixed $value)

No description

Parameters

mixed $offset
mixed $value

Return Value

void

void offsetUnset(mixed $offset)

No description

Parameters

mixed $offset

Return Value

void