示例#1
0
文件: Reward.php 项目: CloCkWeRX/kort
 /**
  * Return the reward in JSON format.
  *
  * @return the reward in JSON format
  */
 public function toJson()
 {
     $response = array();
     if (count($this->getBadges()) > 0) {
         $response["badges"] = Badge::getValues($this->getBadges());
     } else {
         $response["badges"] = array();
     }
     $response["koin_count_new"] = $this->getKoinCountNew();
     $response["koin_count_total"] = $this->getKoinCountTotal();
     return json_encode($response);
 }