You are here

function CMISService::query in CMIS API 6.4

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

File

cmis_common/lib/cmis_repository_wrapper.php, line 527

Class

CMISService

Code

function query($q, $options = array()) {
  static $query_template;
  if (!isset($query_template)) {
    $query_template = CMISService::getQueryTemplate();
  }
  $hash_values = $options;
  $hash_values['q'] = $q;
  $post_value = CMISRepositoryWrapper::processTemplate($query_template, $hash_values);
  $ret = $this
    ->doPost($this->workspace->collections['query'], $post_value, MIME_CMIS_QUERY);
  $objs = $this
    ->extractObjectFeed($ret->body);
  $this
    ->cacheFeedInfo($objs);
  return $objs;
}