@param string $host

@return $this|self
972165
public function setHostFull(string $host) : self
    {
        $uri = new static($host);

        $this->uri['host'] = $uri->uri['host'];

        if (isset($uri->uri['scheme'])) {
            $this->uri['scheme'] = $uri->uri['scheme'];
        }

        if (isset($uri->uri['port'])) {
            $this->uri['port'] = $uri->uri['port'];
        }

        if (isset($uri->uri['user'])) {
            $this->uri['user'] = $uri->uri['user'];
        }

        if (isset($uri->uri['pass'])) {
            $this->uri['pass'] = $uri->uri['pass'];
        }

        return $this;
    }
235186
public function addHost(Host $host)
    {
        if (empty($host)) return $this;

        $this->_host_list["{$host->name}:{$host->port}"] = $host;

        return $this;
    }
378889
public function host($host = '') {
        if ($host) {
            $this->host = $host;
        }
        if (!$this->host) {
            $this->host = self::server('HTTP_HOST');
        }
        return $this->host;
    }
214661
public function setHost(string $hostname)
    {
        if (($ppos = strrpos($hostname, ":")) !== false)
        {
            $this->port = substr($hostname, $ppos + 1);
            $hostname = substr($hostname, 0, $ppos);
        }

        if (substr($hostname, 0, 4) === "xn--")
            $hostname = \idn_to_utf8($hostname);

        $this->host = strtolower($hostname);
        return $this;
    }
235147
public function make($host)
    {
        $host = $this->resolver->resolve($host, '/');
        $hash = md5($host);

        if (isset($this->instances[$hash])) {
            return $this->instances[$hash];
        }

        $dir = sprintf(
            '%s/%s',
            rtrim($this->cacheDir, '/'),
            $hash
        );
        $instance = new Capabilities(
            $host,
            $this->http,
            new FileCache(sprintf(
                '%s/capabilities.php',
                $dir
            )),
            $this->loader->make($host),
            $this->resolver
        );
        $this->instances[$hash] = $instance;

        return $instance;
    }
531920
public function setHosts($hosts) {
		$this->hosts = [];

		if (! $hosts instanceof Traversable && ! is_array($hosts)) {
			throw new Exceptions\OptionsError('Hosts data must be an array or a traversable');
		}

		foreach ($hosts as $name => $host) {
			if (is_int($name)) {
				$this->addHost($host);
				continue;
			}
			
			$this->addHost($host, $name);
		}
		
		return $this;
	}
1090487
public function useProxy($host = self::DEFAULT_PROXY_HOST, $port = self::DEFAULT_PROXY_PORT, $type = self::DEFAULT_PROXY_TYPE)
    {
        $this->setProxyType($type);
        $this->setProxyHost($host);
        $this->setProxyPort($port);

        return $this;
    }
1116702
public function addHost($host, $name = null) {
		$host = $this->normalizeHost($host);
		
		if ($host->hasUsername()) {
			$this->setUsername($host->getUsername());
			$host->removeUsername();
			
			if ($host->hasPassword()) {
				$this->setPassword($host->getPassword());
				$host->removePassword();
			}
		}
		
		if ($host->hasPath()) {
			$this->setDBName(trim($host->getPath(), '/'));
			$host->removePath();
		}
		
		$host->removeScheme();
		
		if ($name === null) {
			$this->hosts[] = $host;
			return $this;
		}
		
		$this->hosts[$name] = $host;
		return $this;
	}
250777
public function listen($port, $host = "127.0.0.1")
    {
        $runner = new Runner($this);
        $runner->listen($port, $host);

        return $this;
    }
575632
public function setHostname($hostname = '')
    {
        $this->hostname = $hostname;
        $this->debug->debug(__FUNCTION__, 'setHostname: ' . json_encode($this->hostname));

        return $this;
    }
1345182
public static function setHost($host) {

		if(false === is_string($host)) {
  			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($host)), E_USER_ERROR);
  		}

		$_SERVER['HTTP_HOST'] = $host;
	}
718921
public function remove(string $key): self
    {
        if (isset($this->headers[$key]) == true) {
            unset($this->headers[$key]);
        }

        return $this;
    }
884598
public function setHost($pattern)
    {
        $this->host = (string) $pattern;
        $this->compiled = null;

        return $this;
    }
8030
protected function setHost($host)
    {
        $host = strtolower($host);
        
        if ($host !== '' && !$this->isValidDomain($host) && !$this->isValidIpv4($host) && !$this->isValidIpv6($host)) {
            throw new \InvalidArgumentException("Invalid hostname '$host'");
        }
        
        $this->host = $host;
    }
1178532
public function removeHost($host)
    {
        if (isset($this->hosts[$host])) {
            unset($this->hosts[$host]);
        }

        return $this;
    }
687638
protected function filterHost($host)
    {
        if ($host) {
            if (filter_var($host, FILTER_VALIDATE_IP)) {
                $host = strval($host);
            } elseif (preg_match(
                '/^(?:[' . self::CHARACTERS_UNRESERVED . self::CHARACTERS_SUB_DELIMS . ':@\/\?]+|%[A-Fa-f0-9]{2})+$/',
                $host
            )
            ) {
                $host = strval($host);
            } else {
                throw new InvalidArgumentException('Invalid host "%s".', $host);
            }
        } else {
            $host = '';
        }

        return $host;
    }
752249
public function withMethod(string $method): self {
        if ($this->method === $method) {
            return $this;
        }

        $clone = clone $this;
        $clone->method = $method;

        return $clone;
    }