本文整理匯總了PHP中Annotation::get_consensus_coll方法的典型用法代碼示例。如果您正苦於以下問題:PHP Annotation::get_consensus_coll方法的具體用法?PHP Annotation::get_consensus_coll怎麽用?PHP Annotation::get_consensus_coll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Annotation
的用法示例。
在下文中一共展示了Annotation::get_consensus_coll方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: consensus
public function consensus()
{
$annotation = new Annotation(1017);
$this->unit->run($annotation->get_consensus_count(), 1, 'get_consensus_count');
$this->unit->run($annotation->get_consensus_coll()->get_item(0)->get_id(), 1018, 'get_consensus_coll後get_item get_id');
unit_test_report($this);
}
示例2: delete
public function delete($json, $callback = NULL)
{
$annotation_id = json_to_object($json);
if (is_null($annotation_id)) {
$data = FALSE;
return $this->_display_jsonp($data, $callback);
}
//set_ignore_authorize(true);
$annotation = new Annotation($annotation_id);
$consensus_coll = $annotation->get_consensus_coll();
$this->_delete_annotation($annotation);
set_ignore_authorize(true);
//刪除時,重新計算分數
foreach ($consensus_coll as $consensus) {
$this->_setup_scores($consensus);
}
context_complete();
//讀取更新後的範圍
$data = $this->_load_my();
/**
* @author Pulipuli Chen <pulipuli.chen@gmail.com> 20111106 如果有必要的話,在此讀取nav
*/
$data['nav'] = $this->_load_nav();
//$data['nav'] = array();
return $this->_display_jsonp($data, $callback);
}