PHP Class WPDKHTTPRequest

Since: 1.3.1
Author: =undo= ([email protected])
Datei anzeigen Open project: wpxtreme/wpdk

Public Methods

Method Description
isAjax ( ) : boolean Return TRUE if we are called by Ajax. Used to be sure that we are responding to an HTTPRequest request and that the WordPress define DOING_AJAX is defined.
isRequest ( string $verb ) : boolean Return true if the $verb param in input match with REQUEST METHOD
isRequestGET ( ) : boolean Return true if the REQUEST METHOD is GET
isRequestPOST ( ) : boolean Return true if the REQUEST METHOD is POST

Method Details

isAjax() public static method

Return TRUE if we are called by Ajax. Used to be sure that we are responding to an HTTPRequest request and that the WordPress define DOING_AJAX is defined.
public static isAjax ( ) : boolean
return boolean TRUE if Ajax trusted

isRequest() public static method

Return true if the $verb param in input match with REQUEST METHOD
public static isRequest ( string $verb ) : boolean
$verb string The verb, for instance; GET, WPDKHTTPVerbs::GET, delete, etc...
return boolean

isRequestGET() public static method

Return true if the REQUEST METHOD is GET
public static isRequestGET ( ) : boolean
return boolean

isRequestPOST() public static method

Return true if the REQUEST METHOD is POST
public static isRequestPOST ( ) : boolean
return boolean