CRM_Utils_REST
class CRM_Utils_REST
This class handles all REST client requests.
Properties
static int | $rest_timeout | Number of seconds we should let a REST process idle | |
string | $ufClass | Cache the actual UF Class |
Methods
Class constructor. This caches the real user framework class locally, so we can use it for authentication and validation.
Simple ping function to test for liveness.
Generates values needed for error messages.
Generates values needed for non-error responses.
No description
No description
No description
No description
No description
No description
No description
used to load a template "inline", eg. for ajax, without having to build a menu for each template
This is a wrapper so you can call an api via json (it returns json too) http://example.org/civicrm/api/json?entity=Contact&action=Get"&json={"contact_type":"Individual","email.get.email":{}} to take all the emails from individuals.
Run ajax request.
Callback for multiple ajax api calls from CRM.api3()
No description
Details
at line 54
__construct()
Class constructor. This caches the real user framework class locally, so we can use it for authentication and validation.
at line 69
static string
ping(string $var = NULL)
Simple ping function to test for liveness.
at line 82
static array
error(string $message = 'Unknown Error')
Generates values needed for error messages.
at line 96
static array
simple(array $params)
Generates values needed for non-error responses.
at line 105
string
run()
at line 113
string
bootAndRun()
at line 126
static string
output($result)
at line 190
static array|int
handle()
at line 262
static array|int
process($args, array $params)
at line 328
static array|mixed|null
buildParamList()
at line 367
static
fatal($pearError)
at line 387
static
loadTemplate()
used to load a template "inline", eg. for ajax, without having to build a menu for each template
at line 448
static
ajaxJson()
This is a wrapper so you can call an api via json (it returns json too) http://example.org/civicrm/api/json?entity=Contact&action=Get"&json={"contact_type":"Individual","email.get.email":{}} to take all the emails from individuals.
Works for POST & GET (POST recommended).
at line 511
static array
ajax()
Run ajax request.
at line 578
static array
processMultiple()
Callback for multiple ajax api calls from CRM.api3()