Updated Showing the pairings of a specific round (markdown)

Jeroen De Meerleer 2019-05-27 13:21:18 +02:00
parent 2a72f7aa9e
commit cf06eb0a58

@ -10,11 +10,12 @@ When you have the round object you can the `Round::GetPairings()` method to get
````php ````php
<?php <?php
require_once('vendor/autoload.php'); require_once('vendor/autoload.php');
use JeroenED\Libpairtwo\Sws; use JeroenED\Libpairtwo\IOFactory;
use JeroenED\Libpairtwo\Enums\Result; use JeroenED\Libpairtwo\Enums\Result;
$sws = Sws::readSws('mycompetition.sws'); $reader = IOFactory::createReader('Pairtwo-6');
$tournament = $sws->getTournament(); $reader->read('mycompetition.sws');
$tournament = $reader->getTournament();
$pairings = $tournament->getRoundByNo($_GET['round'])->getPairings(); $pairings = $tournament->getRoundByNo($_GET['round'])->getPairings();
foreach($pairings as $pairing) { foreach($pairings as $pairing) {