final class DbZoneMetadataStore implements ZoneMetadataStoreInterface (View source)

Zone metadata in the PowerDNS domainmetadata table.

Methods

__construct(PDO $db, ConfigurationInterface $config)

No description

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
isPresigned(string $zoneName)

Whether the PowerDNS zone of that name carries PRESIGNED metadata with content "1", the value PowerDNS itself checks.

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.

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

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

Details

__construct(PDO $db, ConfigurationInterface $config)

No description

Parameters

PDO $db
ConfigurationInterface $config

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 isPresigned(string $zoneName)

Whether the PowerDNS zone of that name carries PRESIGNED metadata with content "1", the value PowerDNS itself checks.

Parameters

string $zoneName

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

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