DragonBe\Vies\HeartBeat::getHost PHP Method

getHost() public method

public getHost ( ) : string
return string
    public function getHost()
    {
        if (null === $this->host) {
            throw new \DomainException('A host is required');
        }
        return $this->host;
    }

Usage Example

Example #1
0
 /**
  * @covers DragonBe\Vies\HeartBeat::__construct
  */
 public function testCanOverrideSettingsAtConstruct()
 {
     $host = 'www.example.com';
     $port = 8080;
     $hb = new HeartBeat($host, $port);
     $this->assertSame($host, $hb->getHost());
     $this->assertSame($port, $hb->getPort());
 }