Voodoo\Core\Http\Request::isAjax PHP Méthode

isAjax() public static méthode

Verify is the access is from ajax.
public static isAjax ( ) : boolean
Résultat boolean
    public static function isAjax()
    {
        return isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == "xmlhttprequest" ? true : false;
    }

Usage Example

Exemple #1
0
 /**
  * CHeck request if it's an ajax request
  * @return bool
  */
 public function isAjax()
 {
     return Http\Request::isAjax();
 }