update docblock for setTitle()
[civicrm-core.git] / api / api.php
index c09d220249775dfe0cc439890f1aa65e28676fb1..8882e8df90f85a3611cf668d8a581ca1978431c3 100644 (file)
@@ -100,20 +100,11 @@ function civicrm_error($result) {
 
 /**
  * @param $entity
- * @param null $version
  *
  * @return string
  */
-function _civicrm_api_get_camel_name($entity, $version = NULL) {
-  $fragments = explode('_', $entity);
-  foreach ($fragments as & $fragment) {
-    $fragment = ucfirst($fragment);
-  }
-  // Special case: UFGroup, UFJoin, UFMatch, UFField
-  if ($fragments[0] === 'Uf') {
-    $fragments[0] = 'UF';
-  }
-  return implode('', $fragments);
+function _civicrm_api_get_camel_name($entity) {
+  return CRM_Utils_String::convertStringToCamel($entity);
 }
 
 /**