You are here

function cmis_vendor_invoke in CMIS API 6

Same name and namespace in other branches
  1. 6.4 cmis.module \cmis_vendor_invoke()
  2. 6.2 cmis.module \cmis_vendor_invoke()
  3. 6.3 cmis.module \cmis_vendor_invoke()
  4. 7.2 cmis.module \cmis_vendor_invoke()
  5. 7 cmis.module \cmis_vendor_invoke()

Utility function used to call a CMIS method, using the CMIS vendor selected in config.

Return value

mixed

35 calls to cmis_vendor_invoke()
cmisapi_addObjectToFolder in ./cmis.api.inc
cmisapi_applyPolicy in ./cmis.api.inc
cmisapi_cancelCheckOut in ./cmis.api.inc
cmisapi_checkIn in ./cmis.api.inc
cmisapi_checkOut in ./cmis.api.inc

... See full list

File

./cmis.module, line 24

Code

function cmis_vendor_invoke() {
  $vendor = variable_get('cmis_vendor', null);
  if (is_null($vendor)) {
    watchdog('cmis_vendor_invoke', "cmis module not configured", null, WATCHDOG_ERROR);
    return;
  }
  $args = func_get_args();
  $cmis_method = $args[0];
  $vendors = cmis_get_vendors();
  if (array_key_exists($vendor, $vendors)) {
    unset($args[0]);
    $function = $vendor . '_cmisapi_' . $cmis_method;
    if (function_exists($function)) {
      return call_user_func_array($function, $args);
    }
    watchdog('cmis_vendor_invoke', "{$function} not implemented", null, WATCHDOG_ERROR);
    return;
  }
  watchdog('cmis_vendor_invoke', "Unknown vendor: {$vendor}", null, WATCHDOG_ERROR);
  return;
}