protected function setHostAndPort($host)
    {
        if (!str_contains($host, ':')) {
            $this->host = $host;
        } else {
            list($this->host, $this->port) = explode(':', $host);

            $this->port = (int) $this->port;
        }
    }
protected function setHostAndPort($host)
    {
        if (!str_contains($host, ':')) {
            $this->host = $host;
        } else {
            list($this->host, $this->port) = explode(':', $host);

            $this->port = (int) $this->port;
        }
    }
protected function setHostAndPort ( $ host ) { if ( ! str_contains ( $ host , ':' ) ) { $ this -> host = $ host ; } else { list ( $ this -> host , $ this -> port ) = explode ( ':' , $ host ) ; $ this -> port = ( int ) $ this -> port ; } }
Set the host and port from a full host string.

@param string $host

@return void
Set the host and port from a full host string .