mirror of
https://github.com/JeroenED/libpairtwo.git
synced 2024-11-29 09:46:42 +01:00
Added tournament year and rounddates
This commit is contained in:
parent
1747373b58
commit
95801e8b4e
@ -54,6 +54,7 @@ class Tournament
|
|||||||
private $SecondPeriod;
|
private $SecondPeriod;
|
||||||
private $Federation;
|
private $Federation;
|
||||||
private $Players;
|
private $Players;
|
||||||
|
private $Year;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
@ -359,4 +360,20 @@ class Tournament
|
|||||||
$this->Players = $Players;
|
$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)));
|
$sws->getTournament()->setOrganiserClub(self::ReadData('String', substr($swscontents, $offset, $length)));
|
||||||
$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) {
|
if ($sws->getBinaryData("CurrentRound") > 0) {
|
||||||
// echo "go" . PHP_EOL;
|
// echo "go" . PHP_EOL;
|
||||||
for ($i = 0; $i < $sws->getBinaryData("CreatedRounds"); $i++) {
|
for ($i = 0; $i < $sws->getBinaryData("CreatedRounds"); $i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user