setDnsServer() public method

Set the DNS server to use when looking up IP's
public setDnsServer ( string $dnsServer = '8.8.8.8' )
$dnsServer string
Example #1
0
 /**
  * Configures the IRC Client
  */
 private function configure()
 {
     $this->connection->setServerHostname($this->getContainer()->get('config')['irc']['server']['host'])->setServerPort($this->getContainer()->get('config')['irc']['server']['port'])->setNickname($this->getContainer()->get('config')['irc']['nickname'])->setUsername($this->getContainer()->get('config')['irc']['username'])->setRealname($this->getContainer()->get('config')['irc']['realname']);
     if ($this->getContainer()->get('config')['irc']['server']['ssl']) {
         $this->connection->setOption('transport', 'ssl');
     }
     $this->client->setLogger($this->getContainer()->get('logger'));
     $this->client->setDnsServer($this->getContainer()->get('config')['dns_server']);
 }
 /**
  * Tests setDnsServer().
  */
 public function testSetDnsServer()
 {
     $ip = '1.2.3.4';
     $this->client->setDnsServer($ip);
     $this->assertSame($ip, $this->client->getDnsServer());
 }