final class ZoneDetail implements ArrayAccess (View source)

One zone with its ownership, as read by ZoneReadRepositoryInterface::getZone().

Both the SQL and the API backend build it through fromRow(), so the key set the internal API and the templates see is defined once. Reading it as an array (zone['name'] in Twig, toArray() for JSON) yields the legacy column-keyed shape.

Methods

__construct(int $id, string $name, string $utf8Name, string $type, string|null $master, string|null $account, int $owner, string $comment, int $recordCount, bool $secured, array $owners, array $fullNames)

No description

static ZoneDetail
fromRow(array $row, array $owners)

Build from the getZoneById() core row plus comment and secured, with the owner rows the repository already looked up.

string|null
primaryOwner()

No description

array
toArray()

The column-keyed array getZone() returned before this model existed.

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, string|null $master, string|null $account, int $owner, string $comment, int $recordCount, bool $secured, array $owners, array $fullNames)

No description

Parameters

int $id
string $name
string $utf8Name
string $type
string|null $master
string|null $account
int $owner
string $comment
int $recordCount
bool $secured
array $owners

Usernames of every owner, primary owner first

array $fullNames

Full name per owner, null when the user has none

static ZoneDetail fromRow(array $row, array $owners)

Build from the getZoneById() core row plus comment and secured, with the owner rows the repository already looked up.

Parameters

array $row

id, name, type, master, account, owner, comment, record_count, secured

array $owners

Return Value

ZoneDetail

string|null primaryOwner()

No description

Return Value

string|null

array toArray()

The column-keyed array getZone() returned before this model existed.

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