2014-02-23 13:15:28 +01:00
|
|
|
<?php
|
2014-04-13 12:00:08 +02:00
|
|
|
namespace Dedimania;
|
|
|
|
|
2014-02-23 13:15:28 +01:00
|
|
|
/**
|
2014-04-13 12:00:08 +02:00
|
|
|
* ManiaControl Dedimania-Plugin Player DataStructure
|
2014-02-25 18:34:35 +01:00
|
|
|
*
|
|
|
|
* @author kremsy and steeffeen
|
2014-04-13 12:00:08 +02:00
|
|
|
* @copyright ManiaControl Copyright © 2014 ManiaControl Team
|
|
|
|
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
2014-02-23 13:15:28 +01:00
|
|
|
*/
|
|
|
|
class DedimaniaPlayer {
|
|
|
|
public $login = '';
|
|
|
|
public $maxRank = -1;
|
|
|
|
public $banned = false;
|
|
|
|
public $optionsEnabled = false;
|
|
|
|
public $options = '';
|
|
|
|
|
|
|
|
public function __construct($player) {
|
2014-03-31 21:54:51 +02:00
|
|
|
if (!$player) return;
|
2014-02-23 13:15:28 +01:00
|
|
|
|
|
|
|
$this->login = $player['Login'];
|
|
|
|
$this->maxRank = $player['MaxRank'];
|
|
|
|
$this->banned = $player['Banned'];
|
|
|
|
$this->optionsEnabled = $player['OptionsEnabled'];
|
2014-02-24 20:20:17 +01:00
|
|
|
$this->options = $player['Options'];
|
2014-02-23 13:15:28 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Construct a new Player by its login and maxRank
|
2014-02-24 20:20:17 +01:00
|
|
|
*
|
2014-02-23 13:15:28 +01:00
|
|
|
* @param $login
|
|
|
|
* @param $maxRank
|
|
|
|
*/
|
2014-02-24 20:20:17 +01:00
|
|
|
public function constructNewPlayer($login, $maxRank) {
|
|
|
|
$this->login = $login;
|
2014-02-23 13:15:28 +01:00
|
|
|
$this->maxRank = $maxRank;
|
|
|
|
}
|
|
|
|
}
|