mirror of
https://github.com/JeroenED/libpairtwo.git
synced 2024-11-26 00:07:42 +01:00
34 lines
597 B
PHP
34 lines
597 B
PHP
|
<?php
|
||
|
/**
|
||
|
* Created by PhpStorm.
|
||
|
* User: jeroen
|
||
|
* Date: 1/02/19
|
||
|
* Time: 11:18
|
||
|
*/
|
||
|
|
||
|
namespace JeroenED\Libpairtwo;
|
||
|
|
||
|
use JeroenED\Libpairtwo\Models\Tournament as TournamentModel;
|
||
|
|
||
|
class Tournament extends TournamentModel
|
||
|
{
|
||
|
/**
|
||
|
* @param Integer $id
|
||
|
* @return Player
|
||
|
*/
|
||
|
public function getPlayerById($id)
|
||
|
{
|
||
|
return $this->GetPlayers()[$id];
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @param Player $Player
|
||
|
*/
|
||
|
public function addPlayer(Player $Player)
|
||
|
{
|
||
|
$newArray = $this->GetPlayers();
|
||
|
$newArray[] = $Player;
|
||
|
$this->setPlayers($newArray);
|
||
|
}
|
||
|
}
|