Exemple #1
0
 public function getRatingForDefaultPlatform()
 {
     $platforms = $this->getValidPlatforms();
     if (sizeof($platforms) == 0) {
         return "n";
     }
     $chosen_platform = $platforms[0];
     foreach ($platforms as $platform) {
         if ($platform->getName() == "windows") {
             $chosen_platform = $platform;
         }
     }
     $query = new RatingHeadersQuery();
     $query->filterByGames($this);
     $result = $query->findOneByGamePlatformId($chosen_platform->getId());
     return Ratings::getRatingForScore($result->getScore());
 }