Utils/ServerUtils.php
/**
     * Determine whether a request has been made with AJAX
     *
     * @return bool
     */
Determine whether a request has been made with AJAX
@return bool
Determine whether a request has been made with AJAX @return bool
public static function requestIsXhr()
    {
        return !empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower(
            $_SERVER['HTTP_X_REQUESTED_WITH']
        ) === 'xmlhttprequest';
    }
public static function requestIsXhr ( ) { return ! empty ( $ _SERVER [ 'HTTP_X_REQUESTED_WITH' ] ) && strtolower ( $ _SERVER [ 'HTTP_X_REQUESTED_WITH' ] ) === 'xmlhttprequest' ; }
Determine whether a request has been made with AJAX
 @return bool
Determine whether a request has been made with AJAX @return bool