Dns
Table of Contents
Interfaces
Classes
- BlockingFallbackDnsResolver
- DnsConfig
- DnsConfigException
- MUST be thrown in case the config can't be read and no fallback is available.
- DnsException
- DnsRecord
- DnsTimeoutException
- HostLoader
- InvalidNameException
- MissingDnsRecordException
- Rfc1035StubDnsResolver
- StaticDnsConfigLoader
- UnixDnsConfigLoader
- WindowsDnsConfigLoader
Functions
- dnsResolver() : DnsResolver
- Retrieve the application-wide DNS resolver instance.
- createDefaultResolver() : DnsResolver
- Create a new DNS resolver best-suited for the current environment.
- resolve() : array<string|int, mixed>
- query() : array<string|int, mixed>
- isValidName() : bool
- Checks whether a string is a valid DNS name.
- normalizeName() : string
- Normalizes a DNS name and automatically checks it for validity.
Functions
dnsResolver()
Retrieve the application-wide DNS resolver instance.
dnsResolver([DnsResolver|null $dnsResolver = null ]) : DnsResolver
Parameters
- $dnsResolver : DnsResolver|null = null
-
Optionally specify a new default DNS resolver instance
Return values
DnsResolver —Returns the application-wide DNS resolver instance
createDefaultResolver()
Create a new DNS resolver best-suited for the current environment.
createDefaultResolver() : DnsResolver
Return values
DnsResolverresolve()
resolve(string $name[, int|null $typeRestriction = null ][, Cancellation|null $cancellation = null ]) : array<string|int, mixed>
Parameters
- $name : string
- $typeRestriction : int|null = null
- $cancellation : Cancellation|null = null
Tags
Return values
array<string|int, mixed>query()
query(string $name, int $type[, Cancellation|null $cancellation = null ]) : array<string|int, mixed>
Parameters
- $name : string
- $type : int
- $cancellation : Cancellation|null = null
Tags
Return values
array<string|int, mixed>isValidName()
Checks whether a string is a valid DNS name.
isValidName(string $name) : bool
Parameters
- $name : string
-
String to check.
Return values
boolnormalizeName()
Normalizes a DNS name and automatically checks it for validity.
normalizeName(string $name) : string
Parameters
- $name : string
-
DNS name.
Tags
Return values
string —Normalized DNS name.