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; }
function query($q, $options = array()) { static $query_template; if (!isset($query_template)) { $query_template = CMISService::getQueryTemplate(); } $default_hash_values = array("includeAllowableActions" => "true", "searchAllVersions" => "false", "maxItems" => 10, "skipCount" => 0); $hash_values = array_merge($default_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; }
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); //need to return false and calling function can handle if ($ret->code <= VALID_XML_RESPONSE) { $objs = $this->extractObjectFeed($ret->body); $this->cacheFeedInfo($objs); return $objs; } else { return false; } }