function cmis_invoke in CMIS API 6.4
Same name and namespace in other branches
- 7.2 cmis.module \cmis_invoke()
- 7 cmis.module \cmis_invoke()
CMIS invoke service. This method should return a stdClass with the following form: $return = new stdClass(); $return->code = 200; // HTTP return code $return->body = 'data'; // result body $return->content_type = 'text/html'; //result content type $return->content_lenght = 200;
Return value
stdClass
1 call to cmis_invoke()
- CommonCMISService::doRequest in cmis_common/
cmis_common.utils.inc
File
- ./
cmis.module, line 120
Code
function cmis_invoke($repositry_id, $url = '', $properties = array()) {
// merge in defaults
$properties += array(
'headers' => array(),
'method' => 'GET',
'data' => NULL,
'retry' => 3,
);
$cmis_repository = cmis_get_repository((string) $repositry_id);
$cmis_transport = $cmis_repository->settings['transport'];
// invoke hook_cmis_invoke()
if (module_exists($cmis_transport)) {
return module_invoke($cmis_transport, 'cmis_invoke', $url, $properties, $cmis_repository->settings);
}
else {
throw new CMISException(t('Unable to lookup CMIS transport [@cmis_transport] for [@cmis_id_or_alias]', array(
'@cmis_id_or_alias' => $repositry_id,
'@cmis_transport' => $cmis_transport,
)));
}
}