class SRVRecordValidator implements DnsRecordValidatorInterface (View source)

SRV record validator

Validates SRV (Service) records according to:

  • RFC 2782: A DNS RR for specifying the location of services (SRV)

SRV records specify the location of services on the network.

The format is: _service._protocol.name. TTL class SRV priority weight port target.

Where:

  • _service: the symbolic name of the service, starting with underscore
  • _protocol: the transport protocol (typically _tcp or _udp), starting with underscore
  • name: the domain name this record refers to
  • priority: the priority of this target (lower values are preferred)
  • weight: relative weight for records with the same priority
  • port: the TCP or UDP port where the service is provided
  • target: the canonical hostname of the machine providing the service

Constants

private WELL_KNOWN_SERVICES

Well-known service names and default ports according to RFC 2782 and IANA registrations

private WELL_KNOWN_PROTOCOLS

Well-known protocols for SRV records according to RFC 2782

Methods

__construct(ConfigurationManager $config)

No description

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

Validates SRV 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 SRV 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