src/Request.php
public function isSelfDomain($throw = false)
    {
        if (!$domains = $this->allowDomains) {
            return true;
        }

        if (!in_array(strtolower($_SERVER['SERVER_NAME']), $domains, true) ||
            !in_array(strtolower($_SERVER['HTTP_HOST']), $domains, true)
        ) {
            if ($throw === true) {
                throw new RequestException("Invalid domain: {$_SERVER['HTTP_HOST']}");
            } else {
                if (class_exists('\rock\log\Log')) {
                    $message = BaseException::convertExceptionToString(new RequestException("Invalid domain: {$_SERVER['HTTP_HOST']}"));
                    Log::err($message);
                }
            }

            return false;
        }

        return true;
    }
public function isSelfDomain($throw = false)
    {
        if (!$domains = $this->allowDomains) {
            return true;
        }

        if (!in_array(strtolower($_SERVER['SERVER_NAME']), $domains, true) ||
            !in_array(strtolower($_SERVER['HTTP_HOST']), $domains, true)
        ) {
            if ($throw === true) {
                throw new RequestException("Invalid domain: {$_SERVER['HTTP_HOST']}");
            } else {
                if (class_exists('\rock\log\Log')) {
                    $message = BaseException::convertExceptionToString(new RequestException("Invalid domain: {$_SERVER['HTTP_HOST']}"));
                    Log::err($message);
                }
            }

            return false;
        }

        return true;
    }
public function isSelfDomain ( $ throw = false ) { if ( ! $ domains = $ this -> allowDomains ) { return true ; } if ( ! in_array ( strtolower ( $ _SERVER [ 'SERVER_NAME' ] ) , $ domains , true ) || ! in_array ( strtolower ( $ _SERVER [ 'HTTP_HOST' ] ) , $ domains , true ) ) { if ( $ throw === true ) { throw new RequestException ( "Invalid domain: {$_SERVER['HTTP_HOST']}" ) ; } else { if ( class_exists ( '\rock\log\Log' ) ) { $ message = BaseException :: convertExceptionToString ( new RequestException ( "Invalid domain: {$_SERVER['HTTP_HOST']}" ) ) ; Log :: err ( $ message ) ; } } return false ; } return true ; }
Is self domain.

@param bool $throw throw an exception (default: false)
@throws RequestException
@return bool
Is self domain .