You are here

static function CMISRepositoryWrapper::processTemplate in CMIS API 6.3

Same name and namespace in other branches
  1. 6.4 cmis_common/lib/cmis_repository_wrapper.php \CMISRepositoryWrapper::processTemplate()
  2. 7 cmis_common/lib/cmis_repository_wrapper.php \CMISRepositoryWrapper::processTemplate()
8 calls to CMISRepositoryWrapper::processTemplate()
CMISService::getContentEntry in cmis_common/lib/cmis_repository_wrapper.php
CMISService::getObject in cmis_common/lib/cmis_repository_wrapper.php
CMISService::getObjectByPath in cmis_common/lib/cmis_repository_wrapper.php
CMISService::getTypeDefinition in cmis_common/lib/cmis_repository_wrapper.php
CMISService::postObject in cmis_common/lib/cmis_repository_wrapper.php

... See full list

File

cmis_common/lib/cmis_repository_wrapper.php, line 149

Class

CMISRepositoryWrapper

Code

static function processTemplate($template, $values = array()) {

  // Fill in the blanks --
  $retval = $template;
  if (is_array($values)) {
    foreach ($values as $name => $value) {
      $retval = str_replace("{" . $name . "}", $value, $retval);
    }
  }

  // Fill in any unpoupated variables with ""
  return preg_replace("/{[a-zA-Z0-9_]+}/", "", $retval);
}