libpairtwo/src/Models/Round.php

101 lines
1.6 KiB
PHP
Raw Normal View History

<?php
/**
* Created by PhpStorm.
* User: jeroen
* Date: 1/02/19
* Time: 17:13
*/
namespace JeroenED\Libpairtwo\Models;
2019-02-11 17:54:50 +01:00
use DateTime;
2019-05-01 15:49:12 +02:00
use JeroenED\Libpairtwo\Game;
use JeroenED\Libpairtwo\Pairing;
2019-02-11 17:54:50 +01:00
2019-05-27 13:06:35 +02:00
abstract class Round
{
2019-03-20 17:33:09 +01:00
/** @var DateTime */
private $date;
2019-03-20 17:33:09 +01:00
/** @var Game[] */
private $games = [];
/** @var int */
private $roundNo;
2019-05-01 15:49:12 +02:00
/** @var Pairing[] */
private $pairings = [];
/**
2019-02-11 17:54:50 +01:00
* @return DateTime
*/
2019-05-28 14:10:42 +02:00
public function getDate(): DateTime
{
return $this->date;
}
/**
2019-02-11 17:54:50 +01:00
* @param DateTime $date
2019-05-28 14:10:42 +02:00
* @return Round
*/
2019-05-28 14:10:42 +02:00
public function setDate(DateTime $date): Round
{
$this->date = $date;
2019-05-28 14:10:42 +02:00
return $this;
}
/**
* @return Game[]
*/
2019-05-28 14:10:42 +02:00
public function getGames(): array
{
return $this->games;
}
/**
* @param Game[] $games
2019-05-28 14:10:42 +02:00
* @return Round
*/
2019-05-28 14:10:42 +02:00
public function setGames(array $games): Round
{
$this->games = $games;
2019-05-28 14:10:42 +02:00
return $this;
}
/**
* @return int
*/
public function getRoundNo(): int
{
return $this->roundNo;
}
/**
* @param int $roundNo
2019-05-28 14:10:42 +02:00
* @return Round
*/
2019-05-28 14:10:42 +02:00
public function setRoundNo(int $roundNo): Round
{
$this->roundNo = $roundNo;
2019-05-28 14:10:42 +02:00
return $this;
}
2019-05-01 15:49:12 +02:00
/**
* @return Pairing[]
*/
public function getPairings(): array
{
return $this->pairings;
}
/**
* @param Pairing[] $pairings
2019-05-28 14:10:42 +02:00
* @return Round
2019-05-01 15:49:12 +02:00
*/
2019-05-28 14:10:42 +02:00
public function setPairings(array $pairings): Round
2019-05-01 15:49:12 +02:00
{
$this->pairings = $pairings;
2019-05-28 14:10:42 +02:00
return $this;
2019-05-01 15:49:12 +02:00
}
}