Documentation

DnsClient
in package

DnsClient class for fetching data about services location

For example the call DnsClient::resolveHost('example') will return URL of the example service

Table of Contents

$dnsRecords  : array<string|int, mixed>
DNS records
clear()  : void
Method clears registry
getServices()  : string
Method returns list of available services
resolveHost()  : string
Method resolves host
serviceExists()  : bool
Method returns true if the service was defined.
setService()  : void
Method saves service URL

Properties

$dnsRecords

DNS records

private static array<string|int, mixed> $dnsRecords = []

Methods

clear()

Method clears registry

public static clear() : void
Return values
void

getServices()

Method returns list of available services

public static getServices() : string
Return values
string

List of services

resolveHost()

Method resolves host

public static resolveHost(string $serviceName) : string
Parameters
$serviceName : string

Service name

Return values
string

Service URL

serviceExists()

Method returns true if the service was defined.

public static serviceExists(string $serviceName) : bool
Parameters
$serviceName : string

Service name return bool Does service exists

Return values
bool

setService()

Method saves service URL

public static setService(string $serviceName, string $serviceUrl) : void
Parameters
$serviceName : string

Service name

$serviceUrl : string

Service URL

Return values
void

Search results

    Яндекс.Метрика