protected function checkDomain()
    {
        if ($this->domain === null) {
            return true;
        }

        if (self::$cachehost !== null) {
            $host = self::$cachehost;
        } else {
            $fhost = Request::header('Host');
            $host = strstr($fhost, ':', true);
            $host = $host ? $host : $fhost;

            self::$cachehost = $host;
        }

        if ($host === $this->domain) {
            return true;
        } elseif ($host) {
            $re = Regex::parse($this->domain);

            if ($re === false || preg_match('#^' . $re . '$#', $host, $matches) === 0) {
                return false;
            }

            array_shift($matches);

            $this->arguments = array_merge($this->arguments, $matches);

            return true;
        }

        return false;
    }
protected function checkDomain()
    {
        if ($this->domain === null) {
            return true;
        }

        if (self::$cachehost !== null) {
            $host = self::$cachehost;
        } else {
            $fhost = Request::header('Host');
            $host = strstr($fhost, ':', true);
            $host = $host ? $host : $fhost;

            self::$cachehost = $host;
        }

        if ($host === $this->domain) {
            return true;
        } elseif ($host) {
            $re = Regex::parse($this->domain);

            if ($re === false || preg_match('#^' . $re . '$#', $host, $matches) === 0) {
                return false;
            }

            array_shift($matches);

            $this->arguments = array_merge($this->arguments, $matches);

            return true;
        }

        return false;
    }
protected function checkDomain ( ) { if ( $ this -> domain === null ) { return true ; } if ( self :: $ cachehost !== null ) { $ host = self :: $ cachehost ; } else { $ fhost = Request :: header ( 'Host' ) ; $ host = strstr ( $ fhost , ':' , true ) ; $ host = $ host ? $ host : $ fhost ; self :: $ cachehost = $ host ; } if ( $ host === $ this -> domain ) { return true ; } elseif ( $ host ) { $ re = Regex :: parse ( $ this -> domain ) ; if ( $ re === false || preg_match ( '#^' . $ re . '$#' , $ host , $ matches ) === 0 ) { return false ; } array_shift ( $ matches ) ; $ this -> arguments = array_merge ( $ this -> arguments , $ matches ) ; return true ; } return false ; }
Method is used for check domain and return arguments if using regex

@return bool
Method is used for check domain and return arguments if using regex