function cmis_vendor_invoke in CMIS API 6
Same name and namespace in other branches
- 6.4 cmis.module \cmis_vendor_invoke()
- 6.2 cmis.module \cmis_vendor_invoke()
- 6.3 cmis.module \cmis_vendor_invoke()
- 7.2 cmis.module \cmis_vendor_invoke()
- 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()
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;
}