libpairtwo/src/Models/Tournament.php

397 lines
7.7 KiB
PHP
Raw Normal View History

2019-01-10 20:05:23 +01:00
<?php
/*
* The MIT License
*
* Copyright 2019 Jeroen De Meerleer <schaak@jeroened.be>.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
namespace JeroenED\Libpairtwo\Models;
2019-02-11 17:37:30 +01:00
2019-02-01 15:55:34 +01:00
use JeroenED\Libpairtwo\Enums\TournamentSystem;
2019-02-11 17:27:26 +01:00
use DateTime;
2019-02-01 15:55:34 +01:00
2019-01-10 20:05:23 +01:00
/**
* Description of Sws
*
* @author Jeroen De Meerleer <schaak@jeroened.be>
*/
2019-01-16 18:03:07 +01:00
class Tournament
{
private $Name;
private $Organiser;
2019-01-19 14:14:01 +01:00
private $OrganiserClubNo;
2019-01-16 18:03:07 +01:00
private $OrganiserClub;
private $OrganiserPlace;
private $OrganiserCountry;
2019-01-18 18:10:56 +01:00
private $FideHomol;
2019-01-16 18:03:07 +01:00
private $StartDate;
private $EndDate;
private $Arbiter;
private $Rounds;
private $Participants;
private $Tempo;
private $NonRatedElo;
private $System;
2019-01-19 14:14:01 +01:00
private $FirstPeriod;
private $SecondPeriod;
private $Federation;
2019-02-01 15:55:34 +01:00
private $Players;
2019-02-11 16:42:20 +01:00
private $Year;
2019-02-11 16:43:36 +01:00
private $Pairings;
2019-01-16 18:03:07 +01:00
/**
2019-01-18 18:10:56 +01:00
* @return string
2019-01-16 18:03:07 +01:00
*/
2019-02-11 17:27:26 +01:00
public function getName(): string
2019-01-16 18:03:07 +01:00
{
return $this->Name;
}
/**
2019-01-18 18:10:56 +01:00
* @param string $Name
2019-01-16 18:03:07 +01:00
*/
2019-02-11 17:27:26 +01:00
public function setName(string $Name): void
2019-01-16 18:03:07 +01:00
{
$this->Name = $Name;
}
/**
2019-01-18 18:10:56 +01:00
* @return string
2019-01-16 18:03:07 +01:00
*/
2019-02-11 17:27:26 +01:00
public function getOrganiser(): string
2019-01-16 18:03:07 +01:00
{
return $this->Organiser;
}
/**
2019-01-18 18:10:56 +01:00
* @param string $Organiser
2019-01-16 18:03:07 +01:00
*/
2019-02-11 17:27:26 +01:00
public function setOrganiser(string $Organiser): void
2019-01-16 18:03:07 +01:00
{
$this->Organiser = $Organiser;
}
/**
2019-02-11 17:27:26 +01:00
* @return string
2019-01-16 18:03:07 +01:00
*/
2019-02-11 17:27:26 +01:00
public function getOrganiserClub(): string
2019-01-16 18:03:07 +01:00
{
return $this->OrganiserClub;
}
/**
2019-02-11 17:27:26 +01:00
* @param string $OrganiserClub
2019-01-16 18:03:07 +01:00
*/
2019-02-11 17:27:26 +01:00
public function setOrganiserClub(string $OrganiserClub): void
2019-01-16 18:03:07 +01:00
{
$this->OrganiserClub = $OrganiserClub;
}
2019-01-19 14:14:01 +01:00
/**
2019-02-11 17:27:26 +01:00
* @return int
2019-01-19 14:14:01 +01:00
*/
2019-02-11 17:27:26 +01:00
public function getOrganiserClubNo(): int
2019-01-19 14:14:01 +01:00
{
return $this->OrganiserClubNo;
}
/**
2019-02-11 17:27:26 +01:00
* @param int $OrganiserClubNo
2019-01-19 14:14:01 +01:00
*/
2019-02-11 17:27:26 +01:00
public function setOrganiserClubNo(int $OrganiserClubNo): void
2019-01-19 14:14:01 +01:00
{
$this->OrganiserClubNo = $OrganiserClubNo;
}
2019-01-16 18:03:07 +01:00
/**
2019-01-18 18:10:56 +01:00
* @return string
2019-01-16 18:03:07 +01:00
*/
2019-02-11 17:27:26 +01:00
public function getOrganiserPlace(): string
2019-01-16 18:03:07 +01:00
{
return $this->OrganiserPlace;
}
/**
2019-01-18 18:10:56 +01:00
* @param string $OrganiserPlace
2019-01-16 18:03:07 +01:00
*/
2019-02-11 17:27:26 +01:00
public function setOrganiserPlace(string $OrganiserPlace): void
2019-01-16 18:03:07 +01:00
{
$this->OrganiserPlace = $OrganiserPlace;
}
/**
2019-01-18 18:10:56 +01:00
* @return string
2019-01-16 18:03:07 +01:00
*/
2019-02-11 17:27:26 +01:00
public function getOrganiserCountry(): string
2019-01-16 18:03:07 +01:00
{
return $this->OrganiserCountry;
}
/**
2019-01-18 18:10:56 +01:00
* @param string $OrganiserCountry
2019-01-16 18:03:07 +01:00
*/
2019-02-11 17:27:26 +01:00
public function setOrganiserCountry(string $OrganiserCountry): void
2019-01-16 18:03:07 +01:00
{
$this->OrganiserCountry = $OrganiserCountry;
}
/**
2019-02-11 17:27:26 +01:00
* @return int
2019-01-18 18:10:56 +01:00
*/
2019-02-11 17:27:26 +01:00
public function getFideHomol(): int
2019-01-18 18:10:56 +01:00
{
return $this->FideHomol;
}
/**
2019-02-11 17:27:26 +01:00
* @param int $FideHomol
2019-01-18 18:10:56 +01:00
*/
2019-02-11 17:27:26 +01:00
public function setFideHomol(int $FideHomol): void
2019-01-18 18:10:56 +01:00
{
$this->FideHomol = $FideHomol;
}
/**
2019-02-11 17:27:26 +01:00
* @return DateTime
2019-01-16 18:03:07 +01:00
*/
2019-02-11 17:27:26 +01:00
public function getStartDate(): DateTime
2019-01-16 18:03:07 +01:00
{
return $this->StartDate;
}
/**
2019-02-11 17:27:26 +01:00
* @param DateTime $StartDate
2019-01-16 18:03:07 +01:00
*/
2019-02-11 17:27:26 +01:00
public function setStartDate(DateTime $StartDate): void
2019-01-16 18:03:07 +01:00
{
$this->StartDate = $StartDate;
}
/**
2019-02-11 17:27:26 +01:00
* @return DateTime
2019-01-16 18:03:07 +01:00
*/
2019-02-11 17:27:26 +01:00
public function getEndDate(): DateTime
2019-01-16 18:03:07 +01:00
{
return $this->EndDate;
2019-01-10 20:05:23 +01:00
}
2019-01-16 18:03:07 +01:00
/**
2019-02-11 17:27:26 +01:00
* @param DateTime $EndDate
2019-01-16 18:03:07 +01:00
*/
2019-02-11 17:27:26 +01:00
public function setEndDate(DateTime $EndDate): void
2019-01-16 18:03:07 +01:00
{
$this->EndDate = $EndDate;
2019-01-10 20:05:23 +01:00
}
2019-01-16 18:03:07 +01:00
/**
2019-01-18 18:10:56 +01:00
* @return string
2019-01-16 18:03:07 +01:00
*/
2019-02-11 17:27:26 +01:00
public function getArbiter(): string
2019-01-16 18:03:07 +01:00
{
return $this->Arbiter;
2019-01-10 20:05:23 +01:00
}
2019-01-16 18:03:07 +01:00
/**
2019-01-18 18:10:56 +01:00
* @param string $Arbiter
2019-01-16 18:03:07 +01:00
*/
2019-02-11 17:27:26 +01:00
public function setArbiter(string $Arbiter): void
2019-01-16 18:03:07 +01:00
{
$this->Arbiter = $Arbiter;
2019-01-10 20:05:23 +01:00
}
2019-01-16 18:03:07 +01:00
/**
2019-02-11 17:27:26 +01:00
* @return int
2019-01-16 18:03:07 +01:00
*/
2019-02-11 17:27:26 +01:00
public function getRounds(): int
2019-01-16 18:03:07 +01:00
{
return $this->Rounds;
2019-01-10 20:05:23 +01:00
}
2019-01-16 18:03:07 +01:00
/**
2019-02-11 17:27:26 +01:00
* @param int $Rounds
2019-01-16 18:03:07 +01:00
*/
2019-02-11 17:27:26 +01:00
public function setRounds(int $Rounds): void
2019-01-16 18:03:07 +01:00
{
$this->Rounds = $Rounds;
2019-01-10 20:05:23 +01:00
}
2019-01-16 18:03:07 +01:00
/**
2019-02-11 17:27:26 +01:00
* @return int
2019-01-16 18:03:07 +01:00
*/
2019-02-11 17:27:26 +01:00
public function getParticipants(): int
2019-01-16 18:03:07 +01:00
{
return $this->Participants;
2019-01-10 20:05:23 +01:00
}
2019-01-16 18:03:07 +01:00
/**
2019-02-11 17:27:26 +01:00
* @param int $Participants
2019-01-16 18:03:07 +01:00
*/
2019-02-11 17:27:26 +01:00
public function setParticipants(int $Participants): void
2019-01-16 18:03:07 +01:00
{
$this->Participants = $Participants;
2019-01-10 20:05:23 +01:00
}
2019-01-16 18:03:07 +01:00
/**
2019-01-18 18:10:56 +01:00
* @return string
2019-01-16 18:03:07 +01:00
*/
2019-02-11 17:27:26 +01:00
public function getTempo(): string
2019-01-16 18:03:07 +01:00
{
return $this->Tempo;
2019-01-10 20:05:23 +01:00
}
2019-01-16 18:03:07 +01:00
/**
2019-01-18 18:10:56 +01:00
* @param string $Tempo
2019-01-16 18:03:07 +01:00
*/
2019-02-11 17:27:26 +01:00
public function setTempo(string $Tempo): void
2019-01-16 18:03:07 +01:00
{
$this->Tempo = $Tempo;
2019-01-10 20:05:23 +01:00
}
2019-01-16 18:03:07 +01:00
/**
2019-02-11 17:27:26 +01:00
* @return int
2019-01-16 18:03:07 +01:00
*/
2019-02-11 17:27:26 +01:00
public function getNonRatedElo(): int
2019-01-16 18:03:07 +01:00
{
return $this->NonRatedElo;
2019-01-10 20:05:23 +01:00
}
2019-01-16 18:03:07 +01:00
/**
2019-02-11 17:27:26 +01:00
* @param int $NonRatedElo
2019-01-16 18:03:07 +01:00
*/
2019-02-11 17:27:26 +01:00
public function setNonRatedElo(int $NonRatedElo): void
2019-01-16 18:03:07 +01:00
{
$this->NonRatedElo = $NonRatedElo;
2019-01-10 20:05:23 +01:00
}
2019-01-16 18:03:07 +01:00
/**
2019-01-19 14:14:01 +01:00
* @return TournamentSystem
2019-01-16 18:03:07 +01:00
*/
2019-02-11 17:27:26 +01:00
public function getSystem(): TournamentSystem
2019-01-16 18:03:07 +01:00
{
return $this->System;
2019-01-10 20:05:23 +01:00
}
2019-01-16 18:03:07 +01:00
/**
2019-01-19 14:14:01 +01:00
* @param TournamentSystem $System
2019-01-16 18:03:07 +01:00
*/
2019-02-11 17:27:26 +01:00
public function setSystem(TournamentSystem $System): void
2019-01-16 18:03:07 +01:00
{
$this->System = $System;
2019-01-10 20:05:23 +01:00
}
2019-01-19 14:14:01 +01:00
/**
2019-02-11 17:27:26 +01:00
* @return string
2019-01-19 14:14:01 +01:00
*/
2019-02-11 17:27:26 +01:00
public function getFirstPeriod(): string
2019-01-19 14:14:01 +01:00
{
return $this->FirstPeriod;
}
/**
2019-02-11 17:27:26 +01:00
* @param string $FirstPeriod
2019-01-19 14:14:01 +01:00
*/
2019-02-11 17:27:26 +01:00
public function setFirstPeriod(string $FirstPeriod): void
2019-01-19 14:14:01 +01:00
{
$this->FirstPeriod = $FirstPeriod;
}
/**
2019-02-11 17:27:26 +01:00
* @return string
2019-01-19 14:14:01 +01:00
*/
2019-02-11 17:27:26 +01:00
public function getSecondPeriod(): string
2019-01-19 14:14:01 +01:00
{
return $this->SecondPeriod;
}
/**
2019-02-11 17:27:26 +01:00
* @param string $SecondPeriod
2019-01-19 14:14:01 +01:00
*/
2019-02-11 17:27:26 +01:00
public function setSecondPeriod(string $SecondPeriod): void
2019-01-19 14:14:01 +01:00
{
$this->SecondPeriod = $SecondPeriod;
}
/**
2019-02-11 17:27:26 +01:00
* @return string
2019-01-19 14:14:01 +01:00
*/
2019-02-11 17:27:26 +01:00
public function getFederation(): string
2019-01-19 14:14:01 +01:00
{
return $this->Federation;
}
/**
2019-02-11 17:27:26 +01:00
* @param string $Federation
2019-01-19 14:14:01 +01:00
*/
2019-02-11 17:27:26 +01:00
public function setFederation(string $Federation): void
2019-01-19 14:14:01 +01:00
{
$this->Federation = $Federation;
}
2019-02-01 15:55:34 +01:00
/**
2019-02-11 17:27:26 +01:00
* @return Player[]
2019-02-01 15:55:34 +01:00
*/
public function getPlayers()
{
return $this->Players;
}
/**
2019-02-11 17:27:26 +01:00
* @param Player[] $Players
2019-02-01 15:55:34 +01:00
*/
public function setPlayers($Players): void
{
$this->Players = $Players;
}
2019-01-10 20:05:23 +01:00
2019-02-11 16:42:20 +01:00
/**
2019-02-11 17:27:26 +01:00
* @return int
2019-02-11 16:42:20 +01:00
*/
2019-02-11 17:27:26 +01:00
public function getYear(): int
2019-02-11 16:42:20 +01:00
{
return $this->Year;
}
/**
2019-02-11 17:27:26 +01:00
* @param int $Year
2019-02-11 16:42:20 +01:00
*/
2019-02-11 17:27:26 +01:00
public function setYear(int $Year): void
2019-02-11 16:42:20 +01:00
{
$this->Year = $Year;
}
2019-02-11 16:43:36 +01:00
/**
* @return Pairing[]
*/
public function getPairings()
{
return $this->Pairings;
}
/**
* @param Pairing[] $Pairings
*/
public function setPairings($Pairings): void
{
$this->Pairings = $Pairings;
}
2019-01-10 20:05:23 +01:00
}