class SVCBRecordValidator implements DnsRecordValidatorInterface (View source)

SVCB record validator

Validates SVCB (Service Binding) records according to:

  • RFC 9460: Service Binding and Parameter Specification via the DNS (DNS SVCB and HTTPS Resource Records)

SVCB records are the general variant of HTTPS records, allowing service binding for any protocol. Format: [param1=value1 param2=value2 ...]

Methods

__construct(ConfigurationManager $config, IPAddressValidator|null $ipValidator = null)

No description

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

Validates SVCB record content

Details

__construct(ConfigurationManager $config, IPAddressValidator|null $ipValidator = null)

No description

Parameters

ConfigurationManager $config
IPAddressValidator|null $ipValidator

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

Validates SVCB record content

SVCB records have the format: [...] Example: 1 . alpn=h2,h3 ipv4hint=192.0.2.1 ipv6hint=2001:db8::1 Example: 0 svc.example.com.

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