You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
689 B
33 lines
689 B
<?php
|
|
|
|
class ModelPlayer
|
|
{
|
|
private $gwPlayer;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->gwPlayer = new GatewayPlayer();
|
|
}
|
|
|
|
public function addPlayer($player)
|
|
{
|
|
$this->gwPlayer->addPlayer($player);
|
|
}
|
|
|
|
public function getPlayerByID($id)
|
|
{
|
|
$playerDataArray = $this->gwPlayer->getPlayerByID($id);
|
|
$player = new Player($playerDataArray["id"], $playerDataArray["nickname"], $playerDataArray["password"]);
|
|
}
|
|
|
|
public function updatePlayer($id, $player)
|
|
{
|
|
$this->gwPlayer->updatePlayer($id, $player);
|
|
}
|
|
|
|
public function deletePlayerByID($id)
|
|
{
|
|
$this->gwPlayer->deletePlayerByID($id);
|
|
}
|
|
}
|