Created e. Reader boilerplate (markdown)

Jeroen De Meerleer 2019-06-05 15:49:34 +02:00
parent 5a97033010
commit ba67f711bb

43
e.-Reader-boilerplate.md Normal file

@ -0,0 +1,43 @@
```php
<?php
use JeroenED\Libpairtwo\Enums\Color;
use JeroenED\Libpairtwo\Enums\Result;
use JeroenED\Libpairtwo\Enums\Tiebreak;
use JeroenED\Libpairtwo\Enums\TournamentSystem;
use JeroenED\Libpairtwo\Interfaces\ReaderInterface;
use JeroenED\Libpairtwo\Pairing;
use JeroenED\Libpairtwo\Round;
use JeroenED\Libpairtwo\Tournament;
use JeroenED\Libpairtwo\Player;
class CompetitieReader implements ReaderInterface
{
/** @var Tournament */
private $Tournament;
/**
* @return Tournament
*/
public function getTournament(): Tournament
{
return $this->Tournament;
}
/**
* @param Tournament $Tournament
*/
public function setTournament(Tournament $Tournament)
{
$this->Tournament = $Tournament;
}
public function read($filename): ReaderInterface
{
$tournament = new Tournament();
// Reading out of fields
$this->setTournament($tournament);
}
}
```