MediaWiki REL1_34
DnsSrvDiscoverer Class Reference

Public Member Functions

 __construct ( $domain)
 
 getServers ()
 Fetch the servers with a DNS SRV request.
 
 pickServer (array $servers)
 Pick a server according to the priority fields.
 
 removeServer ( $server, array $servers)
 

Protected Member Functions

 getDnsRecords ()
 

Private Attributes

string $domain
 

Detailed Description

Since
1.29

Definition at line 26 of file DnsSrvDiscoverer.php.

Constructor & Destructor Documentation

◆ __construct()

DnsSrvDiscoverer::__construct ( $domain)
Parameters
string$domain

Definition at line 35 of file DnsSrvDiscoverer.php.

References $domain.

Member Function Documentation

◆ getDnsRecords()

DnsSrvDiscoverer::getDnsRecords ( )
protected
Returns
array[]

Definition at line 105 of file DnsSrvDiscoverer.php.

Referenced by getServers().

◆ getServers()

DnsSrvDiscoverer::getServers ( )

Fetch the servers with a DNS SRV request.

Returns
array

Definition at line 44 of file DnsSrvDiscoverer.php.

References getDnsRecords().

◆ pickServer()

DnsSrvDiscoverer::pickServer ( array $servers)

Pick a server according to the priority fields.

Note that weight is currently ignored.

Parameters
array$serversfrom getServers
Returns
array|bool

Definition at line 65 of file DnsSrvDiscoverer.php.

◆ removeServer()

DnsSrvDiscoverer::removeServer ( $server,
array $servers )
Parameters
array$server
array$servers
Returns
array[]

Definition at line 91 of file DnsSrvDiscoverer.php.

Member Data Documentation

◆ $domain

string DnsSrvDiscoverer::$domain
private

Definition at line 30 of file DnsSrvDiscoverer.php.

Referenced by __construct().


The documentation for this class was generated from the following file: