2017-03-30 19:39:23 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace ManiaControl\Callbacks\Structures\Common\Models;
|
|
|
|
|
|
|
|
|
2017-04-04 19:40:19 +02:00
|
|
|
use ManiaControl\General\JsonSerializable;
|
|
|
|
use ManiaControl\General\JsonSerializeTrait;
|
2017-03-30 19:39:23 +02:00
|
|
|
use ManiaControl\General\UsageInformationAble;
|
|
|
|
use ManiaControl\General\UsageInformationTrait;
|
|
|
|
use ManiaControl\Players\Player;
|
|
|
|
|
2017-04-04 19:40:19 +02:00
|
|
|
/**
|
|
|
|
* Common PlayerStructure Model
|
|
|
|
*
|
2017-04-07 23:26:35 +02:00
|
|
|
* @api
|
2017-04-04 19:40:19 +02:00
|
|
|
* @author ManiaControl Team <mail@maniacontrol.com>
|
|
|
|
* @copyright 2014-2017 ManiaControl Team
|
|
|
|
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
|
|
|
*/
|
|
|
|
class CommonPlayerScore implements UsageInformationAble, JsonSerializable {
|
|
|
|
use UsageInformationTrait, JsonSerializeTrait;
|
2017-03-30 19:39:23 +02:00
|
|
|
|
|
|
|
protected $player;
|
|
|
|
protected $rank;
|
|
|
|
protected $roundPoints;
|
|
|
|
protected $mapPoints;
|
2017-04-13 16:12:10 +02:00
|
|
|
protected $matchPoints;
|
2017-03-30 19:39:23 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the Player
|
|
|
|
*
|
2017-04-07 23:26:35 +02:00
|
|
|
* @api
|
2017-03-30 19:39:23 +02:00
|
|
|
* @return \ManiaControl\Players\Player
|
|
|
|
*/
|
|
|
|
public function getPlayer() {
|
|
|
|
return $this->player;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2017-04-07 23:26:35 +02:00
|
|
|
* Returns the Player
|
|
|
|
*
|
|
|
|
* @api
|
2017-03-30 19:39:23 +02:00
|
|
|
* @param \ManiaControl\Players\Player $player
|
|
|
|
*/
|
|
|
|
public function setPlayer(Player $player) {
|
|
|
|
$this->player = $player;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the Rank
|
|
|
|
*
|
2017-04-07 23:26:35 +02:00
|
|
|
* @api
|
2017-03-30 19:39:23 +02:00
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
public function getRank() {
|
|
|
|
return $this->rank;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the Rank
|
|
|
|
*
|
2017-04-07 23:26:35 +02:00
|
|
|
* @api
|
2017-03-30 19:39:23 +02:00
|
|
|
* @param int $rank
|
|
|
|
*/
|
|
|
|
public function setRank($rank) {
|
|
|
|
$this->rank = $rank;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the Round Points
|
|
|
|
*
|
2017-04-07 23:26:35 +02:00
|
|
|
* @api
|
2017-03-30 19:39:23 +02:00
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
public function getRoundPoints() {
|
|
|
|
return $this->roundPoints;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the RoundPoints
|
|
|
|
*
|
2017-04-07 23:26:35 +02:00
|
|
|
* @api
|
2017-03-30 19:39:23 +02:00
|
|
|
* @param int $roundPoints
|
|
|
|
*/
|
|
|
|
public function setRoundPoints($roundPoints) {
|
|
|
|
$this->roundPoints = $roundPoints;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the Map Points
|
|
|
|
*
|
2017-04-07 23:26:35 +02:00
|
|
|
* @api
|
2017-03-30 19:39:23 +02:00
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
public function getMapPoints() {
|
|
|
|
return $this->mapPoints;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the Map Points
|
|
|
|
*
|
2017-04-07 23:26:35 +02:00
|
|
|
* @api
|
2017-03-30 19:39:23 +02:00
|
|
|
* @param int $mapPoints
|
|
|
|
*/
|
|
|
|
public function setMapPoints($mapPoints) {
|
|
|
|
$this->mapPoints = $mapPoints;
|
|
|
|
}
|
|
|
|
|
2017-04-13 16:12:10 +02:00
|
|
|
/**
|
|
|
|
* Gets the Match Points
|
|
|
|
*
|
|
|
|
* @api
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function getMatchPoints() {
|
|
|
|
return $this->matchPoints;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the Match Points
|
|
|
|
*
|
|
|
|
* @api
|
|
|
|
* @param mixed $matchPoints
|
|
|
|
*/
|
|
|
|
public function setMatchPoints($matchPoints) {
|
|
|
|
$this->matchPoints = $matchPoints;
|
|
|
|
}
|
|
|
|
|
2017-03-30 19:39:23 +02:00
|
|
|
}
|