class DnsValidatorRegistry (View source)

Registry for DNS record validators

Methods

__construct(ConfigurationInterface $config, DnsBackendProviderInterface $backendProvider, Closure|null $capabilities = null)

No description

getValidator(string $recordType)

Get validator for a specific record type

bool
isKnownType(string $recordType)

Whether a record of this type may be stored: a type with a dedicated validator, or one the admin listed in dns.domain_record_types / dns.reverse_record_types.

bool
isTypeSupportedByServer(string $recordType)

False only when the connected PowerDNS version is known and predates the type.

bool
hasValidator(string $recordType)

Check if a validator exists for a record type

Details

__construct(ConfigurationInterface $config, DnsBackendProviderInterface $backendProvider, Closure|null $capabilities = null)

No description

Parameters

ConfigurationInterface $config
DnsBackendProviderInterface $backendProvider
Closure|null $capabilities

Resolves the connected PowerDNS version, called only when a version-dependent type or SVCB/HTTPS parameter is validated

DnsRecordValidatorInterface getValidator(string $recordType)

Get validator for a specific record type

Parameters

string $recordType

The record type (A, AAAA, CNAME, etc.)

Return Value

DnsRecordValidatorInterface

The validator instance (default validator if specific one not found)

bool isKnownType(string $recordType)

Whether a record of this type may be stored: a type with a dedicated validator, or one the admin listed in dns.domain_record_types / dns.reverse_record_types.

PowerDNS answers SERVFAIL for a type it cannot parse and aborts AXFR of the zone.

Parameters

string $recordType

Return Value

bool

bool isTypeSupportedByServer(string $recordType)

False only when the connected PowerDNS version is known and predates the type.

Parameters

string $recordType

Return Value

bool

bool hasValidator(string $recordType)

Check if a validator exists for a record type

Parameters

string $recordType

The record type

Return Value

bool

True if validator exists (always true now since we use DefaultRecordValidator for unknown types)