libpairtwo/src/Models/Player.php

421 lines
7.0 KiB
PHP
Raw Normal View History

<?php
/**
* Created by PhpStorm.
* User: jeroen
* Date: 19/01/19
* Time: 14:14
*/
namespace JeroenED\Libpairtwo\Models;
2019-02-11 17:37:30 +01:00
2019-02-01 15:51:35 +01:00
use JeroenED\Libpairtwo\Enums\Title;
2019-03-04 11:51:06 +01:00
use JeroenED\Libpairtwo\Enums\Gender;
2019-04-20 16:55:39 +02:00
use JeroenED\Libpairtwo\Pairing;
use DateTime;
2019-05-27 13:06:35 +02:00
abstract class Player
{
2019-03-20 17:33:09 +01:00
/** @var string */
private $Name;
2019-03-20 17:33:09 +01:00
/** @var int */
private $Rank;
2019-03-20 17:33:09 +01:00
/** @var int */
private $FideId;
2019-03-20 17:33:09 +01:00
/** @var int */
private $ExtraPts;
2019-03-20 17:33:09 +01:00
/** @var int */
private $KbsbElo;
2019-03-20 17:33:09 +01:00
/** @var DateTime */
private $dateofbirth;
2019-03-20 17:33:09 +01:00
/** @var int */
private $KbsbID;
2019-03-20 17:33:09 +01:00
/** @var float */
private $Points;
2019-03-20 17:33:09 +01:00
/** @var int */
private $ClubNr;
2019-03-20 17:33:09 +01:00
/** @var float */
private $ScoreBucholtz;
2019-03-20 17:33:09 +01:00
/** @var float */
private $ScoreAmerican;
2019-03-20 17:33:09 +01:00
/** @var int */
private $FideElo;
2019-03-20 17:33:09 +01:00
/** @var string */
private $Nation;
2019-03-20 17:33:09 +01:00
/** @var string */
private $Category;
2019-03-20 17:33:09 +01:00
/** @var Title */
private $Title;
2019-03-20 17:33:09 +01:00
/** @var Gender */
2019-03-04 11:51:06 +01:00
private $Gender;
2019-03-20 17:33:09 +01:00
/** @var int */
2019-02-01 15:55:34 +01:00
private $NumberOfTies;
2019-03-20 17:33:09 +01:00
/** @var bool */
private $Absent;
2019-04-20 16:55:39 +02:00
/** @var Pairing[] */
2019-05-01 17:24:06 +02:00
private $Pairings = [];
2019-04-20 16:55:39 +02:00
/**
* @return string
*/
2019-02-11 17:27:26 +01:00
public function getName(): string
{
return $this->Name;
}
/**
* @param string $Name
2019-05-28 14:10:42 +02:00
* @return Player
*/
2019-05-28 14:10:42 +02:00
public function setName(string $Name): Player
{
$this->Name = $Name;
2019-05-28 14:10:42 +02:00
return $this;
}
/**
2019-02-11 17:27:26 +01:00
* @return int
*/
2019-02-11 17:27:26 +01:00
public function getRank(): int
{
return $this->Rank;
}
/**
2019-02-11 17:27:26 +01:00
* @param int $Rank
2019-05-28 14:10:42 +02:00
* @return Player
*/
2019-05-28 14:10:42 +02:00
public function setRank(int $Rank): Player
{
$this->Rank = $Rank;
2019-05-28 14:10:42 +02:00
return $this;
}
/**
2019-02-11 17:27:26 +01:00
* @return int
*/
2019-02-11 17:27:26 +01:00
public function getFideId(): int
{
return $this->FideId;
}
/**
2019-02-11 17:27:26 +01:00
* @param int $FideId
2019-05-28 14:10:42 +02:00
* @return Player
*/
2019-05-28 14:10:42 +02:00
public function setFideId(int $FideId): Player
{
$this->FideId = $FideId;
2019-05-28 14:10:42 +02:00
return $this;
}
/**
2019-02-11 17:27:26 +01:00
* @return int
*/
2019-02-11 17:27:26 +01:00
public function getExtraPts(): int
{
return $this->ExtraPts;
}
/**
2019-02-11 17:27:26 +01:00
* @param int $ExtraPts
2019-05-28 14:10:42 +02:00
* @return Player
*/
2019-05-28 14:10:42 +02:00
public function setExtraPts(int $ExtraPts): Player
{
$this->ExtraPts = $ExtraPts;
2019-05-28 14:10:42 +02:00
return $this;
}
/**
2019-02-11 17:27:26 +01:00
* @return int
*/
2019-02-11 17:27:26 +01:00
public function getKbsbElo(): int
{
return $this->KbsbElo;
}
/**
2019-02-11 17:27:26 +01:00
* @param int $KbsbElo
2019-05-28 14:10:42 +02:00
* @return Player
*/
2019-05-28 14:10:42 +02:00
public function setKbsbElo(int $KbsbElo): Player
{
$this->KbsbElo = $KbsbElo;
2019-05-28 14:10:42 +02:00
return $this;
}
/**
2019-02-11 17:27:26 +01:00
* @return DateTime
*/
2019-02-11 17:27:26 +01:00
public function getDateofbirth(): DateTime
{
return $this->dateofbirth;
}
/**
* @param DateTime $dateofbirth
2019-05-28 14:10:42 +02:00
* @return Player
*/
2019-05-28 14:10:42 +02:00
public function setDateofbirth(DateTime $dateofbirth): Player
{
$this->dateofbirth = $dateofbirth;
2019-05-28 14:10:42 +02:00
return $this;
}
/**
2019-02-11 17:27:26 +01:00
* @return int
*/
2019-02-11 17:27:26 +01:00
public function getKbsbID(): int
{
return $this->KbsbID;
}
/**
2019-02-11 17:27:26 +01:00
* @param int $KbsbID
2019-05-28 14:10:42 +02:00
* @return Player
*/
2019-05-28 14:10:42 +02:00
public function setKbsbID(int $KbsbID): Player
{
$this->KbsbID = $KbsbID;
2019-05-28 14:10:42 +02:00
return $this;
}
/**
2019-02-11 17:27:26 +01:00
* @return float
*/
2019-02-11 17:27:26 +01:00
public function getPoints(): float
{
return $this->Points;
}
/**
2019-02-11 17:27:26 +01:00
* @param float $Points
2019-05-28 14:10:42 +02:00
* @return Player
*/
2019-05-28 14:10:42 +02:00
public function setPoints(float $Points): Player
{
2019-02-06 20:47:46 +01:00
$this->Points = $Points;
2019-05-28 14:10:42 +02:00
return $this;
}
/**
2019-02-11 17:27:26 +01:00
* @return int
*/
2019-02-11 17:27:26 +01:00
public function getClubNr(): int
{
return $this->ClubNr;
}
/**
2019-02-11 17:27:26 +01:00
* @param int $ClubNr
2019-05-28 14:10:42 +02:00
* @return Player
*/
2019-05-28 14:10:42 +02:00
public function setClubNr(int $ClubNr): Player
{
$this->ClubNr = $ClubNr;
2019-05-28 14:10:42 +02:00
return $this;
}
/**
2019-02-11 17:27:26 +01:00
* @return float
*/
2019-02-11 17:27:26 +01:00
public function getScoreBucholtz(): float
{
return $this->ScoreBucholtz;
}
/**
2019-02-11 17:27:26 +01:00
* @param float $ScoreBucholtz
2019-05-28 14:10:42 +02:00
* @return Player
*/
2019-05-28 14:10:42 +02:00
public function setScoreBucholtz(float $ScoreBucholtz): Player
{
$this->ScoreBucholtz = $ScoreBucholtz;
2019-05-28 14:10:42 +02:00
return $this;
}
/**
2019-05-28 14:10:42 +02:00
* @return float
*/
2019-05-28 14:10:42 +02:00
public function getScoreAmerican(): float
{
return $this->ScoreAmerican;
}
/**
2019-05-28 14:10:42 +02:00
* @param float $ScoreAmerican
* @return Player
*/
2019-05-28 14:10:42 +02:00
public function setScoreAmerican(float $ScoreAmerican): Player
{
2019-02-06 20:54:07 +01:00
$this->ScoreAmerican = $ScoreAmerican;
2019-05-28 14:10:42 +02:00
return $this;
}
/**
2019-02-11 17:27:26 +01:00
* @return int
*/
2019-02-11 17:27:26 +01:00
public function getFideElo(): int
{
return $this->FideElo;
}
/**
2019-02-11 17:27:26 +01:00
* @param int $FideElo
2019-05-28 14:10:42 +02:00
* @return Player
*/
2019-05-28 14:10:42 +02:00
public function setFideElo(int $FideElo): Player
{
$this->FideElo = $FideElo;
2019-05-28 14:10:42 +02:00
return $this;
}
/**
* example value: BEL
*
2019-02-11 17:27:26 +01:00
* @return string
*/
2019-02-11 17:27:26 +01:00
public function getNation(): string
{
return $this->Nation;
}
/**
2019-03-20 17:33:09 +01:00
* example value: BEL
*
* @param string $Nation
2019-05-28 14:10:42 +02:00
* @return Player
*/
2019-05-28 14:10:42 +02:00
public function setNation(string $Nation): Player
{
$this->Nation = $Nation;
2019-05-28 14:10:42 +02:00
return $this;
}
/**
* @return string
*/
2019-02-11 17:27:26 +01:00
public function getCategory(): string
{
return $this->Category;
}
/**
* @param string $Category
2019-05-28 14:10:42 +02:00
* @return Player
*/
2019-05-28 14:10:42 +02:00
public function setCategory(string $Category): Player
{
$this->Category = $Category;
2019-05-28 14:10:42 +02:00
return $this;
}
/**
2019-02-11 17:27:26 +01:00
* @return Title
*/
2019-02-11 17:27:26 +01:00
public function getTitle(): Title
{
return $this->Title;
}
/**
* @param Title $Title
2019-05-28 14:10:42 +02:00
* @return Player
*/
2019-05-28 14:10:42 +02:00
public function setTitle(Title $Title): Player
{
$this->Title = $Title;
2019-05-28 14:10:42 +02:00
return $this;
}
/**
2019-03-04 11:51:06 +01:00
* @return Gender
*/
2019-03-04 11:51:06 +01:00
public function getGender(): Gender
{
2019-03-04 11:51:06 +01:00
return $this->Gender;
}
/**
2019-03-04 11:51:06 +01:00
* @param Gender $Gender
2019-05-28 14:10:42 +02:00
* @return Player
*/
2019-05-28 14:10:42 +02:00
public function setGender(Gender $Gender): Player
{
2019-03-04 11:51:06 +01:00
$this->Gender = $Gender;
2019-05-28 14:10:42 +02:00
return $this;
}
2019-02-01 15:55:34 +01:00
/**
2019-02-11 17:27:26 +01:00
* @return int
2019-02-01 15:55:34 +01:00
*/
2019-02-11 17:27:26 +01:00
public function getNumberOfTies(): int
2019-02-01 15:55:34 +01:00
{
return $this->NumberOfTies;
}
/**
2019-02-11 17:27:26 +01:00
* @param int $NumberOfTies
2019-05-28 14:10:42 +02:00
* @return Player
2019-02-01 15:55:34 +01:00
*/
2019-05-28 14:10:42 +02:00
public function setNumberOfTies(int $NumberOfTies): Player
2019-02-01 15:55:34 +01:00
{
$this->NumberOfTies = $NumberOfTies;
2019-05-28 14:10:42 +02:00
return $this;
2019-02-01 15:55:34 +01:00
}
/**
2019-02-11 17:27:26 +01:00
* @return bool
*/
2019-05-28 14:10:42 +02:00
public function isAbsent(): bool
{
return $this->Absent;
}
/**
2019-02-11 17:27:26 +01:00
* @param bool $Absent
2019-05-28 14:10:42 +02:00
* @return Player
*/
2019-05-28 14:10:42 +02:00
public function setAbsent(bool $Absent): Player
{
$this->Absent = $Absent;
2019-05-28 14:10:42 +02:00
return $this;
}
2019-04-20 16:55:39 +02:00
/**
* @return Pairing[]
*/
public function getPairings(): array
{
return $this->Pairings;
}
/**
* @param Pairing[] $Pairings
2019-05-28 14:10:42 +02:00
* @return Player
2019-04-20 16:55:39 +02:00
*/
2019-05-28 14:10:42 +02:00
public function setPairings(array $Pairings): Player
2019-04-20 16:55:39 +02:00
{
$this->Pairings = $Pairings;
2019-05-28 14:10:42 +02:00
return $this;
2019-04-20 16:55:39 +02:00
}
2019-02-01 15:55:34 +01:00
}