CRM_Utils_REST
class CRM_Utils_REST
This class handles all REST client requests.
Properties
static | $rest_timeout | Number of seconds we should let a REST process idle | |
$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 52
__construct()
Class constructor. This caches the real user framework class locally, so we can use it for authentication and validation.
at line 67
static string
ping(string $var = NULL)
Simple ping function to test for liveness.
at line 80
static array
error(string $message = 'Unknown Error')
Generates values needed for error messages.
at line 94
static array
simple(array $params)
Generates values needed for non-error responses.
at line 103
string
run()
at line 111
string
bootAndRun()
at line 124
static string
output($result)
at line 191
static string
jsonFormated($data)
deprecated
deprecated
at line 281
static array|int
handle()
at line 353
static array|int
process($args, array $params)
at line 416
static array|mixed|null
buildParamList()
at line 451
static
fatal($pearError)
at line 471
static
loadTemplate()
used to load a template "inline", eg. for ajax, without having to build a menu for each template
at line 530
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 589
static array
ajax()
Run ajax request.
at line 653
static array
processMultiple()
Callback for multiple ajax api calls from CRM.api3()