public function setHost($host)
    {
        $this->host = trim(strtolower($host));

        if ('' === $this->host) {
            $this->merge();

            return;
        }

        if (!isset($this->cache['hosts-configuration'])) {
            $this->merge();

            return;
        }

        foreach ($this->cache['hosts-configuration'] as $hostConf) {
            if (!isset($hostConf['servername'])) {
                continue;
            }
            if ($this->match($this->host, $hostConf['servername'])) {
                $this->merge($hostConf);
                break;
            }
            if (!isset($hostConf['hosts'])) {
                continue;
            }
            foreach ((array) $hostConf['hosts'] as $hostname) {
                if ($this->match($this->host, $hostname)) {
                    $this->merge($hostConf);
                    break 2;
                }
            }
        }
    }
public function setHost($host)
    {
        $this->host = trim(strtolower($host));

        if ('' === $this->host) {
            $this->merge();

            return;
        }

        if (!isset($this->cache['hosts-configuration'])) {
            $this->merge();

            return;
        }

        foreach ($this->cache['hosts-configuration'] as $hostConf) {
            if (!isset($hostConf['servername'])) {
                continue;
            }
            if ($this->match($this->host, $hostConf['servername'])) {
                $this->merge($hostConf);
                break;
            }
            if (!isset($hostConf['hosts'])) {
                continue;
            }
            foreach ((array) $hostConf['hosts'] as $hostname) {
                if ($this->match($this->host, $hostname)) {
                    $this->merge($hostConf);
                    break 2;
                }
            }
        }
    }
public function setHost ( $ host ) { $ this -> host = trim ( strtolower ( $ host ) ) ; if ( '' === $ this -> host ) { $ this -> merge ( ) ; return ; } if ( ! isset ( $ this -> cache [ 'hosts-configuration' ] ) ) { $ this -> merge ( ) ; return ; } foreach ( $ this -> cache [ 'hosts-configuration' ] as $ hostConf ) { if ( ! isset ( $ hostConf [ 'servername' ] ) ) { continue ; } if ( $ this -> match ( $ this -> host , $ hostConf [ 'servername' ] ) ) { $ this -> merge ( $ hostConf ) ; break ; } if ( ! isset ( $ hostConf [ 'hosts' ] ) ) { continue ; } foreach ( ( array ) $ hostConf [ 'hosts' ] as $ hostname ) { if ( $ this -> match ( $ this -> host , $ hostname ) ) { $ this -> merge ( $ hostConf ) ; break 2 ; } } } }
Sets the host name to switch on.

@param $host
Sets the host name to switch on .