interface ZoneMetadataStoreInterface (View source)

Where a zone's metadata rows live: the domainmetadata table on the SQL backend, or the PowerDNS API (metadata plus zone-object properties) on the API backend. Rows are [['kind' => string, 'content' => string], ...].

Constants

SUPPORT_SUPPORTED

SUPPORT_UNSUPPORTED_KNOWN

SUPPORT_UNKNOWN

Methods

array
load(int $zoneId, string $zoneName)

The zone's metadata rows sorted by kind.

bool
replaceAll(int $zoneId, string $zoneName, array $rows, array $before)

Replace the zone's whole metadata set.

bool
replaceKind(int $zoneId, string $zoneName, string $kind, array $values, array $before)

Set every value of one kind, leaving the other kinds alone.

string|null
writeRejection(string $kind)

Why this store cannot hold the kind (a MetadataDefinitions::REJECT_* code), or null.

string
kindSupport(array $definition, callable $capabilities)

Whether the store is known to take a version-gated kind: a SUPPORT_* value.

Details

array load(int $zoneId, string $zoneName)

The zone's metadata rows sorted by kind.

Parameters

int $zoneId
string $zoneName

Return Value

array

bool replaceAll(int $zoneId, string $zoneName, array $rows, array $before)

Replace the zone's whole metadata set.

Parameters

int $zoneId
string $zoneName
array $rows

The set after the write

array $before

The set as loaded before it

Return Value

bool

bool replaceKind(int $zoneId, string $zoneName, string $kind, array $values, array $before)

Set every value of one kind, leaving the other kinds alone.

Parameters

int $zoneId
string $zoneName
string $kind
array $values

Empty removes the kind

array $before

The set as loaded before the write

Return Value

bool

string|null writeRejection(string $kind)

Why this store cannot hold the kind (a MetadataDefinitions::REJECT_* code), or null.

Server-managed kinds are refused before the store is asked.

Parameters

string $kind

Return Value

string|null

string kindSupport(array $definition, callable $capabilities)

Whether the store is known to take a version-gated kind: a SUPPORT_* value.

The capabilities are resolved only by a store whose support depends on the connected server, so a database store never triggers the version probe.

Parameters

array $definition

A MetadataDefinitions entry

callable $capabilities

Return Value

string