You are here

static function CMISService::getContentEntry in CMIS API 6.4

Same name and namespace in other branches
  1. 6.3 cmis_common/lib/cmis_repository_wrapper.php \CMISService::getContentEntry()
  2. 7 cmis_common/lib/cmis_repository_wrapper.php \CMISService::getContentEntry()
1 call to CMISService::getContentEntry()
CMISService::postObject in cmis_common/lib/cmis_repository_wrapper.php

File

cmis_common/lib/cmis_repository_wrapper.php, line 620

Class

CMISService

Code

static function getContentEntry($content, $content_type = "application/octet-stream") {
  static $contentTemplate;
  if (!isset($contentTemplate)) {
    $contentTemplate = CMISService::getContentTemplate();
  }
  if ($content) {
    return CMISRepositoryWrapper::processTemplate($contentTemplate, array(
      "content" => base64_encode($content),
      "content_type" => $content_type,
    ));
  }
  else {
    return "";
  }
}