protected function matchHost($host)
    {
        if (empty($this->host)) {
            return true;
        }

        $host = preg_replace('/^[^:]+:\/\//i', '', $host);
        $regex = str_replace('\{basename\}', '.*', preg_quote($this->host));

        return preg_match('/^' . $regex . '$/i', $host);
    }
protected function matchHost($host)
    {
        if (empty($this->host)) {
            return true;
        }

        $host = preg_replace('/^[^:]+:\/\//i', '', $host);
        $regex = str_replace('\{basename\}', '.*', preg_quote($this->host));

        return preg_match('/^' . $regex . '$/i', $host);
    }
protected function matchHost ( $ host ) { if ( empty ( $ this -> host ) ) { return true ; } $ host = preg_replace ( '/^[^:]+:\/\//i' , '' , $ host ) ; $ regex = str_replace ( '\{basename\}' , '.*' , preg_quote ( $ this -> host ) ) ; return preg_match ( '/^' . $ regex . '$/i' , $ host ) ; }
Returns true if request matches host or if no host restrictions set

@param string $host

@return bool
Returns true if request matches host or if no host restrictions set