Beispiel #1
0
 public function getRating()
 {
     $query = new RatingsQuery();
     $query->orderByThreshold("DESC");
     $query->limit(1);
     $query->where("threshold <= " . $this->getScore());
     return $query->findOne();
 }
Beispiel #2
0
 public static function getRatingForScore($score)
 {
     return RatingsQuery::create()->where('Ratings.Threshold <= ?', $score)->orderByThreshold("DESC")->findOne();
 }