class SOARecordValidator implements DnsRecordValidatorInterface (View source)

SOA record validator

Validates SOA (Start of Authority) records according to:

  • RFC 1035: Domain Names - Implementation and Specification
  • RFC 1982: Serial Number Arithmetic
  • RFC 2308: Negative Caching of DNS Queries (DNS NCACHE)

SOA record format: [primary_ns] [admin_email] [serial] [refresh] [retry] [expire] [minimum]

Methods

__construct(HostnameValidator $hostnameValidator, ConfigurationInterface $config)

No description

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

Validates SOA record through the generic validator interface

validateSoa(string $content, string $name, mixed $prio, int|string|null $ttl, int $defaultTTL, string $dnsHostmaster, string $zone)

Validates an SOA record against the zone it belongs to

Details

__construct(HostnameValidator $hostnameValidator, ConfigurationInterface $config)

No description

Parameters

HostnameValidator $hostnameValidator
ConfigurationInterface $config

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

Validates SOA record through the generic validator interface

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

ValidationResult validateSoa(string $content, string $name, mixed $prio, int|string|null $ttl, int $defaultTTL, string $dnsHostmaster, string $zone)

Validates an SOA record against the zone it belongs to

Parameters

string $content

SOA record content

string $name

SOA name

mixed $prio

Priority (not used for SOA records)

int|string|null $ttl

TTL value

int $defaultTTL

Default TTL value

string $dnsHostmaster

Hostmaster email address

string $zone

Zone name

Return Value

ValidationResult

ValidationResult containing validated data or error messages