*/ class TournamentFormatter { public static function getSummary(Tournament $tournament) { return TournamentFormatter::getHeaders($tournament, true); } public static function getFull(Tournament $tournament) { $content = TournamentFormatter::getHeaders($tournament, false); $tournamentCategories = CategoryLister::GetCategoriesForTournament($tournament); foreach ($tournamentCategories as $category) { $content .= CategoryFormatter::getFullTournament($category, $tournament); } return $content; } private static function getHeaders(Tournament $tournament, $linkOnName) { $identifier = $tournament->getIdentifier(); $name = $tournament->getName(); $location = $tournament->getLocation(); $comments = $tournament->getComments(); $type = $tournament->getType(); $date = DateFormatter::formatDMY($tournament->getDate()); $happenedOn = Localization::happenedOn($location, $date); if ($linkOnName) { $nameLine = "$name"; } else { $nameLine = $name; } $content = <<

$nameLine

$type
$happenedOn

BOX; return $content; } } ?>