Esempio n. 1
0
 /**
  * Returns the average rating information across the uids.
  *
  * @param int $iid the item used to calculate the average
  * @param array $uids the uids used to retrieve the ratings to calculate the average, otherwise default to all users
  * 
  * public function ratings_getAverage($iid, $uids = null)
  */
 public function execute()
 {
     $vote = Api_Bo_Ratings::getAverage($this->getAppId(), $this->item_id, $this->uids);
     $retVal = array();
     $retVal['rating'] = array();
     $retVal['rating'][0] = array('iid' => $this->item_id, 'average_vote' => $vote);
     return $retVal;
 }