public static function isAjax()
    {
        $returnValue = (bool) false;

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

		if(isset($_SERVER['HTTP_X_REQUESTED_WITH'])){
			if(strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'){
				$returnValue = true;
			}
		}
                
        return (bool) $returnValue;
    }
public static function isAjax ( ) { $ returnValue = ( bool ) false ; if ( isset ( $ _SERVER [ 'HTTP_X_REQUESTED_WITH' ] ) ) { if ( strtolower ( $ _SERVER [ 'HTTP_X_REQUESTED_WITH' ] ) == 'xmlhttprequest' ) { $ returnValue = true ; } } return ( bool ) $ returnValue ; }
Enables you to know if the request in the current scope is an ajax

@access public
@author Bertrand Chevrier, <bertrand.chevrier@tudor.lu>
@return boolean
Enables you to know if the request in the current scope is an ajax