X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fclass.api.php;h=93dda31ec1b2c266dfa9dd3a47616d6652d09de1;hb=a953e3e44d504c65ced19fac8c7ab8087d5f2072;hp=5e27abc454ef33f2094cfdb3dfb91ad5dd123d50;hpb=4bbcbcbb713357f4e5dff143eeb4a243ad6ea6c9;p=civicrm-core.git diff --git a/api/class.api.php b/api/class.api.php index 5e27abc454..93dda31ec1 100644 --- a/api/class.api.php +++ b/api/class.api.php @@ -5,7 +5,7 @@ * This class allows to consume the API, either from within a module that knows civicrm already: * * @code - * require_once('api/class/api.php'); + * require_once('api/class.api.php'); * $api = new civicrm_api3(); * @endcode * @@ -20,7 +20,9 @@ * or to query a remote server via the rest api * * @code - * $api = new civicrm_api3 (array ('server' => 'http://example.org','api_key'=>'theusersecretkey','key'=>'thesitesecretkey')); + * $api = new civicrm_api3 (array ('server' => 'http://example.org', + * 'api_key'=>'theusersecretkey', + * 'key'=>'thesitesecretkey')); * @endcode * * No matter how initialised and if civicrm is local or remote, you use the class the same way. @@ -111,10 +113,10 @@ class civicrm_api3 { if (isset($config) && isset($config['conf_path'])) { define('CIVICRM_SETTINGS_PATH', $config['conf_path'] . '/civicrm.settings.php'); require_once CIVICRM_SETTINGS_PATH; - require_once 'CRM/Core/Classloader.php'; + require_once 'CRM/Core/ClassLoader.php'; require_once 'api/api.php'; require_once "api/v3/utils.php"; - CRM_Core_Classloader::singleton()->register(); + CRM_Core_ClassLoader::singleton()->register(); $this->cfg = CRM_Core_Config::singleton(); $this->init(); } @@ -196,6 +198,13 @@ class civicrm_api3 { return $res; } + /** + * @param $entity + * @param string $action + * @param array $params + * + * @return bool + */ function call($entity, $action = 'Get', $params = array()) { if (is_int($params)) { $params = array('id' => $params);