$events_id ); $ids = $this->findIdsBy($condition); if(!$ids){ return null; } return $this->gets($ids); } /** * 投票数增加 */ public function upNum($id,$num=1){ $data = $this->get($id); $info = array( 'num' => $data['num'] + $num ); return $this->modify($info,array('id' => $id)); } /** * 投票数递减 * @param unknown $id * @param number $num * @return Ambigous <\KIF\Data\ResultWrapper, \KIF\Data\ResultWrapper> */ public function decrNum($id, $num = 1) { $data = $this->get($id); $info = array( 'num' => $data['num'] - $num ); return $this->modify($info,array('id' => $id)); } }