@param string|array $host

@return \Symfony\Component\Process\Process
501063
public function flush($host = null): Process
    {
        $host = $this->getHosts($host);

        $command = $this->generateBanCommand($host);

        return $this->executeCommand($command);
    }
230327
public function findConfiguredHost($host)
    {
        list($user, $host) = $this->parseHost($host);

        foreach ($this->groups as $group) {
            if ((isset($group['host']) && $group['host'] == $host) ||
                (isset($group['hostname']) && $group['hostname'] == $host)) {
                if (! empty($user)) {
                    // User is not specified in the SSH configuration...
                    if (! isset($group['user'])) {
                        continue;
                    }

                    // User is specified in the SSH configuration but is not the given user....
                    if (isset($group['user']) && $group['user'] != $user) {
                        continue;
                    }
                }

                return $group['host'];
            }
        }
    }
68005
private function executeComposerInstall($host)
    {
        $ssh = $host->getSshClient();
        $ssh->exec(array(
            sprintf('cd %s;', $host->getWorkingDirectory()),
            'stat composer.phar'
        ));
        if ($ssh->getExitCode()) {
            $this->installComposer($host);
        }
        $ssh = $host->getSshClient();
        $ssh->exec(
            array(
                sprintf('cd %s;', $host->getWorkingDirectory()),
                'php composer.phar install --no-dev'
            ),
            null,
            self::TIMEOUT_MAX_RUNTIME_COMPOSER_INSTALL
        );
        if ($ssh->getExitCode()) {
            throw new SynchronisationException($host->getName(), sprintf(
                'Unable to execute composer install: "%s".',
                $ssh->getErrorOutput()
            ));
        }
    }
694746
public function withHost($host)
    {
        $uri = $this->getUri()->withHost($host);

        /** @var static $clone */
        $clone = $this->withUri($uri);

        return $clone;
    }
1035310
public static function tryParse(string $host): ?HostInterface
    {
        if (!self::myParse($host, $hostname, $ipAddress)) {
            return null;
        }

        return new self($hostname, $ipAddress);
    }
378889
public function host($host = '') {
        if ($host) {
            $this->host = $host;
        }
        if (!$this->host) {
            $this->host = self::server('HTTP_HOST');
        }
        return $this->host;
    }
750959
public function setHost(/* string */ $host) {
		// Close connection before changing host.
		if ($this->host !== $host) {
			$this->close();
			$this->host = $host;
		}
	}
1027451
public static function create($host, $port)
  {
    $transceiver = new SocketTransceiver();
    $transceiver->createSocket($host, $port);
    
    return $transceiver;
  }
1267551
protected function setHost($host)
    {
        $this->uriString = null;

        $this->host = (string) $host;

        return $this;
    }
129105
public function getHost(string $host)
	{
		$host = Host::filter($host);
		return $this->offsetExists($host) ? $this->hosts[$host] : null;
	}
1105
public function setHost($host)
    {
        if (! (self::_isHostname($host) || self::_isIpAddress($host))) {

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

        $this->_host = strtolower(trim($host));
    }
494279
protected function resolveHost($host)
    {
        if (strpos($host, '://') !== false) {
            list($schema, $host) = explode('://', $host, 2);
        }

        if ($this->schema) {
            $schema = $this->schema;
        }

        if (empty($schema)) {
            $schema = 'http';
        }

        return array($schema, $host);
    }
154074
protected function assembleHost(Url $host) {
		if (! $host->hasHost()) {
			$host->setHost($this->defaultHost);
		}
		
		if (preg_match('/\.sock$/i', $host->getHost())) {
			$host->removePort();
		} else if (! $host->hasPort()) {
			$host->setPort($this->defaultPort);
		}
		
		return trim($host->assemble(), '/');
	}
371294
public function setHost($host)
  {
    if ($this->isLocked()) {
      return $this->getObj()->setHost($host)->setLocked();
    } else {
      return parent::setHost($host);
    }
  }
815735
public function setHost($host)
    {
        $this->host = $host;
        if (strpos($host, '/') !== false || strpos($host, '?') !== false) {
            if (strpos($host, 'http') === false) {
                $host = 'https://' . $host;
            }
            $url = parse_url($host);
            $this->host = $url['host'];

            if (isset($url['path'])) {
                $this->setPath($url['path']);
            }

            if (isset($url['query'])) {
                if (!isset($url['path'])) { // for example.org?query=string
                    $this->setPath('/');
                }
                $this->setQuery($url['query']);
            }
        }

        return $this;
    }
28564
public function setHost(Host $host)
    {
        $this->host = $host;

        if ($this->status != self::STATUS_NEW) {
            throw new \RuntimeException('Cannot set worker host after worker has started working');
        }
    }
805498
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 Loader(
            new FileCache(sprintf(
                '%s/definitions.php',
                $dir
            )),
            $this->resolver,
            $this->builder,
            $this->http,
            $this->validator
        );
        $this->instances[$hash] = $instance;

        return $instance;
    }