diff --git a/dist/template.php b/dist/template.php index aced29e..4ae1cb2 100644 --- a/dist/template.php +++ b/dist/template.php @@ -2,7 +2,7 @@ // EDIT ME! $pairingfile = 'your pairing-file.swar'; -$fileformat = 'Swar-4'; // Possible values: Pairtwo-5, Pairtwo-6, Swar-4 +$fileformat = 'Swar-4'; // Possible getValue()s: Pairtwo-5, Pairtwo-6, Swar-4 ?> @@ -37,37 +37,37 @@ $reader->read($pairingfile); // 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 '
White | Black | Result | |||||
---|---|---|---|---|---|---|---|
' . ($game->getBoard() + 1) . ' | ' . PHP_EOL; - echo '' . $game->getWhite()->getPlayer()->getName() . ' | ' . PHP_EOL; - echo '' . $game->getBlack()->getPlayer()->getName() . ' | ' . PHP_EOL; - echo '' . $game->getResult()->getValue() . ' | ' . PHP_EOL; + echo '' . ($game->Board + 1) . ' | ' . PHP_EOL; + echo '' . $game->White->Player->Name . ' | ' . PHP_EOL; + echo '' . $game->Black->Player->Name . ' | ' . PHP_EOL; + echo '' . $game->Result->getValue() . ' | ' . PHP_EOL; echo '
Bye: '; $bye = []; - foreach ($round->getBye() as $pairing) { - $bye[] = $pairing->getPlayer()->getName(); + foreach ($round->Bye as $pairing) { + $bye[] = $pairing->Player->Name; } echo implode('; ', $bye); echo '
' . PHP_EOL; echo 'Absent: '; $bye = []; - foreach ($round->getAbsent() as $pairing) { - $bye[] = $pairing->getPlayer()->getName(); + foreach ($round->Absent as $pairing) { + $bye[] = $pairing->Player->Name; } echo implode('; ', $bye); echo '
' . PHP_EOL; @@ -77,7 +77,7 @@ echo 'Name (elo) | ' . PHP_EOL; -foreach ($reader->getTournament()->getTieBreaks() as $tiebreak) { +foreach ($reader->Tournament->TieBreaks as $tiebreak) { echo '' . $tiebreak->getValue() . ' | ' . PHP_EOL; } echo '|||||
---|---|---|---|---|---|---|
' . $rank . ' | ' . PHP_EOL; - echo '' . $player->getName() . '(' . $player->getElo($reader->getTournament()->getPriorityElo()) . ') | ' . PHP_EOL; - echo '' . implode(' | ', $player->getTiebreaks()) . ' | ' . PHP_EOL; + echo '' . $player->Name . '(' . $player->getElo($reader->Tournament->PriorityElo) . ') | ' . PHP_EOL; + echo '' . implode(' | ', $player->Tiebreaks) . ' | ' . PHP_EOL; echo '