changed direct public property access to using getter methods

phpdoc improvements
This commit is contained in:
Steffen Schröder
2014-08-02 22:31:46 +02:00
parent 58a668cf65
commit e560919096
70 changed files with 450 additions and 271 deletions

View File

@ -36,8 +36,9 @@ class SimpleStatsList implements ManialinkPageAnswerListener, CallbackListener,
const ACTION_SORT_STATS = 'SimpleStatsList.SortStats';
/*
* Private Properties
* Private properties
*/
/** @var ManiaControl $maniaControl */
private $maniaControl = null;
private $statArray = array();
private $statsWidth = 0;
@ -118,9 +119,9 @@ class SimpleStatsList implements ManialinkPageAnswerListener, CallbackListener,
* @param string $order
*/
public function showStatsList(Player $player, $order = PlayerManager::STAT_SERVERTIME) {
$height = $this->maniaControl->manialinkManager->styleManager->getListWidgetsHeight();
$quadStyle = $this->maniaControl->manialinkManager->styleManager->getDefaultMainWindowStyle();
$quadSubstyle = $this->maniaControl->manialinkManager->styleManager->getDefaultMainWindowSubStyle();
$height = $this->maniaControl->manialinkManager->getStyleManager()->getListWidgetsHeight();
$quadStyle = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultMainWindowStyle();
$quadSubstyle = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultMainWindowSubStyle();
$maniaLink = new ManiaLink(ManialinkManager::MAIN_MLID);

View File

@ -53,8 +53,9 @@ class StatisticCollector implements CallbackListener {
const WEAPON_ARROW = 5;
/*
* Private Properties
* Private properties
*/
/** @var ManiaControl $maniaControl */
private $maniaControl = null;
private $onShootArray = array();
@ -114,7 +115,7 @@ class StatisticCollector implements CallbackListener {
return;
}
$leaders = $this->maniaControl->server->rankingManager->getLeaders();
$leaders = $this->maniaControl->server->getRankingManager()->getLeaders();
foreach ($leaders as $leaderLogin) {
$leader = $this->maniaControl->playerManager->getPlayer($leaderLogin);

View File

@ -30,22 +30,27 @@ class StatisticManager {
const SPECIAL_STAT_ARROW_ACC = 'Arrow Accuracy';
/*
* Public Properties
* Public properties
*/
/** @var StatisticCollector $statisticCollector */
/** @deprecated see getStatisticCollector() */
public $statisticCollector = null;
/** @var SimpleStatsList $simpleStatsList */
/** @deprecated see getSimpleStatsList() */
public $simpleStatsList = null;
/*
* Private Properties
* Private properties
*/
/** @var ManiaControl $maniaControl */
private $maniaControl = null;
private $stats = array();
private $specialStats = array();
/**
* Construct player manager
* Construct a new statistic manager instance
*
* @param \ManiaControl\ManiaControl $maniaControl
* @param ManiaControl $maniaControl
*/
public function __construct(ManiaControl $maniaControl) {
$this->maniaControl = $maniaControl;
@ -165,6 +170,24 @@ class StatisticManager {
$this->specialStats[self::SPECIAL_STAT_ROCKET_ACC] = $stat;
}
/**
* Return the statistic collector
*
* @return StatisticCollector
*/
public function getStatisticCollector() {
return $this->statisticCollector;
}
/**
* Return the simple stats list
*
* @return SimpleStatsList
*/
public function getSimpleStatsList() {
return $this->simpleStatsList;
}
/**
* Get All statistics ordered by an given name
*