read($pairingfile); // From here on you can start. Please use the examples on https://github.com/jeroened/libpairtwo/wiki // You can also use the doc/api folder to get all possible methods and fields // Below is an example of what can be used. Feel free to modify this. echo '

' . $reader->getTournament()->getName() . '

' . PHP_EOL; foreach ($reader->getTournament()->getRounds() as $round) { echo '

Round ' . ($round->getRoundNo() + 1) . ': ' . $round->getDate()->format('m/d/Y') . '

' . PHP_EOL; echo '' . PHP_EOL; echo '' . PHP_EOL; echo '' . PHP_EOL; echo '' . PHP_EOL; echo '' . PHP_EOL; foreach ($round->getGames() as $game) { echo '' . PHP_EOL; echo '' . PHP_EOL; echo '' . PHP_EOL; echo '' . PHP_EOL; echo '' . PHP_EOL; } echo '' . PHP_EOL; echo '
WhiteBlackResult
' . $game->getWhite()->getPlayer()->getName() . '' . $game->getBlack()->getPlayer()->getName() . '' . $game->getResult()->getValue() . '
' . PHP_EOL; echo '

Bye: '; $bye = []; foreach ($round->getBye() as $pairing) { $bye[] = $pairing->getPlayer()->getName(); } echo implode(', ', $bye); echo '

' . PHP_EOL; echo '

Absent: '; $bye = []; foreach ($round->getAbsent() as $pairing) { $bye[] = $pairing->getPlayer()->getName(); } echo implode('; ', $bye); echo '

' . PHP_EOL; } echo '

Rankings

' . PHP_EOL; echo '' . PHP_EOL; echo '' . PHP_EOL; echo '' . PHP_EOL; foreach ($reader->getTournament()->getTieBreaks() as $tiebreak) { echo '' . PHP_EOL; } echo '' . PHP_EOL; echo '' . PHP_EOL; echo '' . PHP_EOL; $rank = 1; foreach ($reader->getTournament()->getRanking() as $player) { echo '' . PHP_EOL; echo '' . PHP_EOL; echo '' . PHP_EOL; echo '' . PHP_EOL; echo '' . PHP_EOL; $rank++; } echo '' . PHP_EOL; echo '
Name (elo)' . $tiebreak->getValue() . '
' . $rank . '' . $player->getName() . '(' . $player->getElo($reader->getTournament()->getPriorityElo()) . ')' . implode('', $player->getTiebreaks()) . '
' . PHP_EOL; ?>