Пример #1
0
 private static function createFromDb($resource)
 {
     if (!is_null($resource)) {
         $match = new Match();
         $match->setMatchId($resource["match_id"]);
         $match->setMatchDateTime($resource["match_date_time"]);
         $match->setVenueId($resource["venue_id"]);
         $match->setPlayerCount($resource["player_count"]);
         $match->setWinningTeamId($resource["winning_team_id"]);
         $match->setTied($resource["tied"]);
         $match->setCreatedDate($resource["created_date"]);
         $match->setStatus($resource["status"]);
         return $match;
     }
     return null;
 }