public function getRating() { $query = new RatingQuery(); $query->orderByThreshold("DESC"); $query->limit(1); $query->where("threshold <= " . $this->getScore()); return $query->findOne(); }
public static function getAllRatings() { $query = new RatingQuery(); $query->orderByThreshold(); return $query->find(); }