+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2019 |
+ | Copyright CiviCRM LLC (c) 2004-2020 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
$version = \CRM_Utils_Array::value('version', $params);
switch ($version) {
default:
- $apiRequest = array();
+ $apiRequest = [];
$apiRequest['id'] = self::$nextId++;
$apiRequest['version'] = (int) $version;
$apiRequest['params'] = $params;
return $apiRequest;
case 4:
- $callable = array("Civi\\Api4\\$entity", $action);
+ $callable = ["Civi\\Api4\\$entity", $action];
if (!is_callable($callable)) {
throw new Exception\NotImplementedException("API ($entity, $action) does not exist (join the API team and implement it!)");
}
return strtolower(\CRM_Utils_String::munge($action));
}
+ public static function getNextId() {
+ return self::$nextId++;
+ }
+
}