public function isAjax(): bool
    {
        if (isset($_SERVER['HTTP_X_REQUESTED_WITH'])) {
            return (strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');
        }

        if (isset($_SERVER['HTTP_X_AJAX'])) {
            return (strtolower($_SERVER['HTTP_X_AJAX']) == 'true' || $_SERVER['HTTP_X_AJAX'] == '1');
        }

        return false;
    }
public function isAjax(): bool
    {
        if (isset($_SERVER['HTTP_X_REQUESTED_WITH'])) {
            return (strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');
        }

        if (isset($_SERVER['HTTP_X_AJAX'])) {
            return (strtolower($_SERVER['HTTP_X_AJAX']) == 'true' || $_SERVER['HTTP_X_AJAX'] == '1');
        }

        return false;
    }
public function isAjax ( ) : bool { if ( isset ( $ _SERVER [ 'HTTP_X_REQUESTED_WITH' ] ) ) { return ( strtolower ( $ _SERVER [ 'HTTP_X_REQUESTED_WITH' ] ) == 'xmlhttprequest' ) ; } if ( isset ( $ _SERVER [ 'HTTP_X_AJAX' ] ) ) { return ( strtolower ( $ _SERVER [ 'HTTP_X_AJAX' ] ) == 'true' || $ _SERVER [ 'HTTP_X_AJAX' ] == '1' ) ; } return false ; }
Is ajax.
@return bool
Is ajax .