various phpdoc improvements and additions
added some getter methods for properties
This commit is contained in:
@ -10,7 +10,7 @@ use ManiaControl\Players\Player;
|
||||
use ManiaControl\Players\PlayerManager;
|
||||
|
||||
/**
|
||||
* Class managing the Custom UI Settings
|
||||
* Class managing the Custom UI in TrackMania
|
||||
*
|
||||
* @author ManiaControl Team <mail@maniacontrol.com>
|
||||
* @copyright 2014 ManiaControl Team
|
||||
@ -23,7 +23,7 @@ class CustomUIManager implements CallbackListener, TimerListener {
|
||||
const CUSTOMUI_MLID = 'CustomUI.MLID';
|
||||
|
||||
/*
|
||||
* Private Properties
|
||||
* Private properties
|
||||
*/
|
||||
private $maniaControl = null;
|
||||
/** @var customUI $customUI */
|
||||
@ -31,7 +31,7 @@ class CustomUIManager implements CallbackListener, TimerListener {
|
||||
private $updateManialink = false;
|
||||
|
||||
/**
|
||||
* Create a Custom UI Manager
|
||||
* Create a custom UI manager instance
|
||||
*
|
||||
* @param ManiaControl $maniaControl
|
||||
*/
|
||||
|
@ -26,7 +26,7 @@ class IconManager implements CallbackListener {
|
||||
const PRELOAD_MLID = 'IconManager.Preload.MLID';
|
||||
|
||||
/**
|
||||
* Some Default icons
|
||||
* Default icons
|
||||
*/
|
||||
const MX_ICON = 'ManiaExchange.png';
|
||||
const MX_ICON_MOVER = 'ManiaExchange_logo_press.png';
|
||||
@ -35,13 +35,13 @@ class IconManager implements CallbackListener {
|
||||
const MX_ICON_GREEN_MOVER = 'ManiaExchange_logo_pressGreen.png';
|
||||
|
||||
/**
|
||||
* Private Properties
|
||||
* Private properties
|
||||
*/
|
||||
private $maniaControl = null;
|
||||
private $icons = array();
|
||||
|
||||
/**
|
||||
* Create a new Icon Manager
|
||||
* Construct a new icon manager instance
|
||||
*
|
||||
* @param ManiaControl $maniaControl
|
||||
*/
|
||||
@ -55,14 +55,13 @@ class IconManager implements CallbackListener {
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the Set of default Icons
|
||||
* Add the set of default icons
|
||||
*/
|
||||
private function addDefaultIcons() {
|
||||
$this->addIcon(self::MX_ICON);
|
||||
$this->addIcon(self::MX_ICON_MOVER);
|
||||
$this->addIcon(self::MX_ICON_GREEN);
|
||||
$this->addIcon(self::MX_ICON_GREEN_MOVER);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -125,4 +124,4 @@ class IconManager implements CallbackListener {
|
||||
public function handlePlayerConnect(Player $player) {
|
||||
$this->preloadIcons($player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -30,14 +30,17 @@ class ManialinkManager implements ManialinkPageAnswerListener, CallbackListener
|
||||
const CB_MAIN_WINDOW_OPENED = 'ManialinkManagerCallback.MainWindowOpened';
|
||||
|
||||
/*
|
||||
* Public Properties
|
||||
* Public properties
|
||||
*/
|
||||
/** @var StyleManager $styleManager */
|
||||
public $styleManager = null;
|
||||
/** @var CustomUIManager $customUIManager */
|
||||
public $customUIManager = null;
|
||||
/** @var IconManager $iconManager */
|
||||
public $iconManager = null;
|
||||
|
||||
/*
|
||||
* Private Properties
|
||||
* Private properties
|
||||
*/
|
||||
private $maniaControl = null;
|
||||
// TODO: use listening class
|
||||
@ -45,17 +48,19 @@ class ManialinkManager implements ManialinkPageAnswerListener, CallbackListener
|
||||
private $pageAnswerRegexListener = array();
|
||||
|
||||
/**
|
||||
* Create a new manialink manager
|
||||
* Construct a new manialink manager instance
|
||||
*
|
||||
* @param ManiaControl $maniaControl
|
||||
*/
|
||||
public function __construct(ManiaControl $maniaControl) {
|
||||
$this->maniaControl = $maniaControl;
|
||||
|
||||
// Children
|
||||
$this->styleManager = new StyleManager($maniaControl);
|
||||
$this->customUIManager = new CustomUIManager($maniaControl);
|
||||
$this->iconManager = new IconManager($maniaControl);
|
||||
|
||||
// Register for callbacks
|
||||
// Callbacks
|
||||
$this->registerManialinkPageAnswerListener(self::ACTION_CLOSEWIDGET, $this, 'closeWidgetCallback');
|
||||
$this->maniaControl->callbackManager->registerCallbackListener(CallbackManager::CB_MP_PLAYERMANIALINKPAGEANSWER, $this, 'handleManialinkPageAnswer');
|
||||
}
|
||||
@ -85,6 +90,33 @@ class ManialinkManager implements ManialinkPageAnswerListener, CallbackListener
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the style manager
|
||||
*
|
||||
* @return StyleManager
|
||||
*/
|
||||
public function getStyleManager() {
|
||||
return $this->styleManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the custom UI manager
|
||||
*
|
||||
* @return CustomUIManager
|
||||
*/
|
||||
public function getCustomUIManager() {
|
||||
return $this->customUIManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the icon manager
|
||||
*
|
||||
* @return IconManager
|
||||
*/
|
||||
public function getIconManager() {
|
||||
return $this->iconManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a new manialink page answer reg ex listener
|
||||
*
|
||||
|
@ -33,10 +33,10 @@ class StyleManager {
|
||||
const SETTING_LIST_WIDGETS_WIDTH = 'List Widgets Width';
|
||||
const SETTING_LIST_WIDGETS_HEIGHT = 'List Widgets Height';
|
||||
|
||||
const SETTING_ICON_DEFAULT_OFFSET_SM = 'Default Icon Offset in Shootmania';
|
||||
const SETTING_ICON_DEFAULT_OFFSET_SM = 'Default Icon Offset in ShootMania';
|
||||
|
||||
/*
|
||||
* Private Properties
|
||||
* Private properties
|
||||
*/
|
||||
private $maniaControl = null;
|
||||
|
||||
|
Reference in New Issue
Block a user