mirror of
https://github.com/JeroenED/libpairtwo.git
synced 2024-11-21 22:17:41 +01:00
Added tournament year and rounddates
This commit is contained in:
parent
987db07c9c
commit
682cf386b6
@ -54,6 +54,7 @@ class Tournament
|
||||
private $SecondPeriod;
|
||||
private $Federation;
|
||||
private $Players;
|
||||
private $Year;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
@ -359,4 +360,20 @@ class Tournament
|
||||
$this->Players = $Players;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getYear()
|
||||
{
|
||||
return $this->Year;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $Year
|
||||
*/
|
||||
public function setYear($Year): void
|
||||
{
|
||||
$this->Year = $Year;
|
||||
}
|
||||
|
||||
}
|
||||
|
13
src/Sws.php
13
src/Sws.php
@ -457,7 +457,18 @@ class Sws extends SwsModel
|
||||
$sws->getTournament()->setOrganiserClub(self::ReadData('String', substr($swscontents, $offset, $length)));
|
||||
$offset += $length;
|
||||
|
||||
// echo dechex($offset) . PHP_EOL;
|
||||
// Tournament year
|
||||
$length = 4;
|
||||
$sws->getTournament()->setYear(self::ReadData('Int', substr($swscontents, $offset, $length)));
|
||||
$offset += $length;
|
||||
|
||||
// Round dates
|
||||
for ($i = 1; $i < $sws->getTournament()->getRounds(); $i++) {
|
||||
$length = 4;
|
||||
$sws->setBinaryData('Round_' . $i . '_date', self::ReadData('Date', substr($swscontents, $offset, $length)));
|
||||
$offset += $length;
|
||||
}
|
||||
|
||||
if ($sws->getBinaryData("CurrentRound") > 0) {
|
||||
// echo "go" . PHP_EOL;
|
||||
for ($i = 0; $i < $sws->getBinaryData("CreatedRounds"); $i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user