src/Koldy/Url.php
public function getHost(): string
    {
        if (!isset($this->segments['host'])) {
            throw new UrlException('Unable to get host for ' . $this->url);
        }

        return $this->segments['host'];
    }
public function getHost(): string
    {
        if (!isset($this->segments['host'])) {
            throw new UrlException('Unable to get host for ' . $this->url);
        }

        return $this->segments['host'];
    }
public function getHost ( ) : string { if ( ! isset ( $ this -> segments [ 'host' ] ) ) { throw new UrlException ( 'Unable to get host for ' . $ this -> url ) ; } return $ this -> segments [ 'host' ] ; }
Get URL's host

@return string
@throws \Koldy\Url\Exception
Get URL s host