/** * Return only the last match played, with additional informations (teams and scores included) * * @return Match Object */ public static function getLastResult() { $match = null; $matchs = MatchModel::getLastResults(1); if (count($matchs) == 1) { $match = $matchs[0]; $matchId = $match->ID; $match->match_date = Meta::get($matchId, 'match_date'); $match->match_team_dom = Meta::get($matchId, 'match_team_dom'); $match->match_team_ext = Meta::get($matchId, 'match_team_ext'); $match->score_dom = Meta::get($matchId, 'score_dom'); $match->score_ext = Meta::get($matchId, 'score_ext'); } return $match; }