final class RecordRow implements ArrayAccess, JsonSerializable (View source)

One record of a zone listing, as the export, template-save and console paths read it.

The two backends disagreed about the shape: the SQL repository returned disabled as a bool and comments under comment/comment_account, while the API repository returned disabled as 0/1 and comments under api_comment and friends unless a caller asked for them. fromRow() settles both, so a consumer no longer has to know which backend produced the row. Reading it as an array keeps the column-keyed shape the templates and exporters already use.

Methods

__construct(int|string $id, int $domainId, string $name, string $type, string $content, int $ttl, int $prio, bool $disabled, string|null $comment = null, string|null $commentAccount = null, int|null $commentModifiedAt = null, int|null $modifiedAt = null, int|null $changeDate = null, string|null $ordername = null, bool|null $auth = null)

No description

static RecordRow
fromRow(array $row)

Build from either backend's row. Comments are read from the SQL names first and the API names second, so a row that carries neither yields null.

array
toArray()

The column-keyed shape. Backend-specific columns appear only when the row carried them, the way the repositories behaved before.

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|string $id, int $domainId, string $name, string $type, string $content, int $ttl, int $prio, bool $disabled, string|null $comment = null, string|null $commentAccount = null, int|null $commentModifiedAt = null, int|null $modifiedAt = null, int|null $changeDate = null, string|null $ordername = null, bool|null $auth = null)

No description

Parameters

int|string $id

Numeric on the SQL backend, an encoded string on the API backend

int $domainId
string $name
string $type
string $content
int $ttl
int $prio
bool $disabled
string|null $comment
string|null $commentAccount
int|null $commentModifiedAt
int|null $modifiedAt

API backend with PowerDNS 4.9.8+ on LMDB only; set per RRset write

int|null $changeDate

SQL backend only

string|null $ordername

SQL backend only

bool|null $auth

SQL backend only

static RecordRow fromRow(array $row)

Build from either backend's row. Comments are read from the SQL names first and the API names second, so a row that carries neither yields null.

Parameters

array $row

Return Value

RecordRow

array toArray()

The column-keyed shape. Backend-specific columns appear only when the row carried them, the way the repositories behaved before.

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