Removed stats from Player Class

This commit is contained in:
Steffen Schröder
2014-01-01 18:53:19 +01:00
parent 31fdecafa5
commit 6c56938ddd
2 changed files with 99 additions and 107 deletions

View File

@ -1,10 +1,11 @@
<?php
namespace ManiaControl\Players;
use ManiaControl\Formatter;
/**
* Class representing players
* Player Model Class
*
* @author kremsy & steeffeen
*/
@ -18,8 +19,6 @@ class Player {
public $nickname = '';
public $path = '';
public $authLevel = 0;
public $joinCount = 0;
public $totalPlayed = 0;
public $language = '';
public $avatar = '';
public $allies = array();
@ -32,10 +31,11 @@ class Player {
public $ladderRank = -1;
public $joinTime = -1;
public $ipAddress = '';
/**
* Construct a player from XmlRpc data
*
* @param array $rpcInfos
* @param array $rpcInfos
*/
public function __construct(array $rpcInfos) {
if (!$rpcInfos) {
@ -55,14 +55,12 @@ class Player {
$this->isReferee = $rpcInfos['IsReferee'];
$this->ladderScore = $rpcInfos['LadderStats']['PlayerRankings'][0]['Score'];
$this->ladderRank = $rpcInfos['LadderStats']['PlayerRankings'][0]['Ranking'];
$this->ipAddress = $rpcInfos['IPAddress'];
$this->joinTime = time();
}
/**
* Check if player is not a real player
*
@ -72,7 +70,6 @@ class Player {
return ($this->pid <= 0 || $this->path == "");
}
/**
* Get province
*