setHost() публичный Метод

Set host.
public setHost ( string $host )
$host string Host.
Пример #1
0
 /**
  * Tests Connection Options getters and setters without setting user and password.
  *
  * @return void
  */
 public function testSettersAndGettersWithoutCredentials()
 {
     $options = new ConnectionOptions();
     $options->setHost('host')->setPort(4222)->setLang('lang')->setVersion('version')->setVerbose(true)->setPedantic(true)->setReconnect(true);
     $this->assertEquals('host', $options->getHost());
     $this->assertEquals(4222, $options->getPort());
     $this->assertNull($options->getUser());
     $this->assertNull($options->getPass());
     $this->assertEquals('lang', $options->getLang());
     $this->assertEquals('version', $options->getVersion());
     $this->assertTrue($options->isVerbose());
     $this->assertTrue($options->isPedantic());
     $this->assertTrue($options->isReconnect());
 }