You are here

function cmis_service in CMIS API 6.3

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_service()
CommonCMISService::doRequest in cmis_common/cmis_common.utils.inc

File

./cmis.module, line 120

Code

function cmis_service($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_service()
  if (module_exists($cmis_transport)) {
    return module_invoke($cmis_transport, 'cmis_service', $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,
    )));
  }
}