class DNAMERecordValidator implements DnsRecordValidatorInterface (View source)

DNAME record validator

DNAME records are defined in RFC 6672 as a mechanism for DNS domain name redirection. They provide a way to make all names under one domain be aliases for names under another domain, essentially creating an alias for an entire subtree of the DNS.

Format:

Key constraints from RFC 6672:

  • DNAME records must be unique at a given owner name (singleton)
  • DNAME and CNAME records MUST NOT coexist at the same owner name
  • DNAME records at zone apex require special handling for NS records
  • DNAME records create aliases for all subdomains of their owner name
  • DNAME target must be a fully-qualified domain name
  • DNAME cannot point to itself or create loops

Methods

__construct(ConfigurationManager $config)

No description

validate(string $content, string $name, mixed $prio, int|string|null $ttl, int $defaultTTL, mixed ...$args)

Validates DNAME record content

Details

__construct(ConfigurationManager $config)

No description

Parameters

ConfigurationManager $config

ValidationResult validate(string $content, string $name, mixed $prio, int|string|null $ttl, int $defaultTTL, mixed ...$args)

Validates DNAME record content

Parameters

string $content

The content part of the record

string $name

The name part of the record

mixed $prio

The priority value (if applicable)

int|string|null $ttl

The TTL value

int $defaultTTL

The default TTL to use if not specified

mixed ...$args

Additional validator-specific parameters

Return Value

ValidationResult

ValidationResult containing validated data or error messages