BlockingFallbackDnsResolver
in package
implements
DnsResolver
uses
ForbidCloning, ForbidSerialization
FinalYes
Table of Contents
Interfaces
Methods
- __serialize() : never
- __unserialize() : never
- query() : array<int, DnsRecord>
- Query specific DNS records.
- resolve() : array<int, DnsRecord>
- Resolves a hostname name to an IP address [hostname as defined by RFC 3986].
- __clone() : mixed
Methods
__serialize()
public
final __serialize() : never
Return values
never__unserialize()
public
final __unserialize(array<string|int, mixed> $data) : never
Parameters
- $data : array<string|int, mixed>
Return values
neverquery()
Query specific DNS records.
public
query(string $name, int $type[, Cancellation|null $cancellation = null ]) : array<int, DnsRecord>
Upon success this method returns an array of Record objects. If no records of the given type are found, a DnsException is thrown.
Parameters
- $name : string
-
Record to question, A, AAAA and PTR queries are automatically normalized.
- $type : int
-
Use constants of Amp\Dns\Record.
- $cancellation : Cancellation|null = null
Return values
array<int, DnsRecord>resolve()
Resolves a hostname name to an IP address [hostname as defined by RFC 3986].
public
resolve(string $name[, int|null $typeRestriction = null ][, Cancellation|null $cancellation = null ]) : array<int, DnsRecord>
Upon success this method returns an array of Record objects. If the domain cannot be resolved, a DnsException is thrown.
A null $ttl value indicates the DNS name was resolved from the cache or the local hosts file.
Parameters
- $name : string
-
The hostname to resolve.
- $typeRestriction : int|null = null
-
Optional type restriction to
Record::AorRecord::AAAA, otherwisenull. - $cancellation : Cancellation|null = null
Return values
array<int, DnsRecord>__clone()
protected
final __clone() : mixed