public function setHost($host)
    {
        if (! (self::_isHostname($host) || self::_isIpAddress($host))) {

            throw new InvalidArgumentException("Invalid host ($host)");
        }

        $this->_host = strtolower(trim($host));
    }
public function setHost($host)
    {
        if (! (self::_isHostname($host) || self::_isIpAddress($host))) {

            throw new InvalidArgumentException("Invalid host ($host)");
        }

        $this->_host = strtolower(trim($host));
    }
public function setHost ( $ host ) { if ( ! ( self :: _isHostname ( $ host ) || self :: _isIpAddress ( $ host ) ) ) { throw new InvalidArgumentException ( "Invalid host ($host)" ) ; } $ this -> _host = strtolower ( trim ( $ host ) ) ; }
Sets the host for this URL.

@param string $host The hostname or IP address for this URL.

@throws InvalidArgumentException If the given host is not an IP address or hostname.

@return void
Sets the host for this URL .