various phpdoc improvements and additions
added some getter methods for properties
This commit is contained in:
@ -41,7 +41,7 @@ class Commands implements CallbackListener, CommandListener, ManialinkPageAnswer
|
||||
const COMMAND_FORCE_WARMUP = 'Command_ForceWarmUp';
|
||||
|
||||
/*
|
||||
* Private Properties
|
||||
* Private properties
|
||||
*/
|
||||
private $maniaControl = null;
|
||||
private $serverShutdownTime = -1;
|
||||
|
@ -11,7 +11,7 @@ namespace ManiaControl\Server;
|
||||
*/
|
||||
class Config {
|
||||
/*
|
||||
* Public Properties
|
||||
* Public properties
|
||||
*/
|
||||
public $id = null;
|
||||
public $host = null;
|
||||
@ -20,7 +20,7 @@ class Config {
|
||||
public $pass = null;
|
||||
|
||||
/**
|
||||
* Create a new Server Config Instance
|
||||
* Create a new server config instance
|
||||
*
|
||||
* @param mixed $id
|
||||
* @param mixed $host
|
||||
|
@ -16,12 +16,12 @@ use ManiaControl\ManiaControl;
|
||||
*/
|
||||
class Directory implements CallbackListener {
|
||||
/**
|
||||
* Private Properties
|
||||
* Private properties
|
||||
*/
|
||||
private $maniaControl = null;
|
||||
|
||||
/**
|
||||
* Create new Server Directory Object
|
||||
* Create new server directory instance
|
||||
*
|
||||
* @param ManiaControl $maniaControl
|
||||
*/
|
||||
@ -75,6 +75,15 @@ class Directory implements CallbackListener {
|
||||
return $this->getGameDataFolder() . '..' . DIRECTORY_SEPARATOR . 'Logs' . DIRECTORY_SEPARATOR;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the Game Data Folder Path
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getGameDataFolder() {
|
||||
return $this->maniaControl->client->gameDataDirectory();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
@ -90,13 +99,4 @@ class Directory implements CallbackListener {
|
||||
public function getCacheFolder() {
|
||||
return $this->getGameDataFolder() . '..' . DIRECTORY_SEPARATOR . 'CommonData' . DIRECTORY_SEPARATOR . 'Cache' . DIRECTORY_SEPARATOR;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the Game Data Folder Path
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getGameDataFolder() {
|
||||
return $this->maniaControl->client->gameDataDirectory();
|
||||
}
|
||||
}
|
||||
|
@ -17,14 +17,14 @@ use Maniaplanet\DedicatedServer\Xmlrpc\GameModeException;
|
||||
*/
|
||||
class RankingManager implements CallbackListener {
|
||||
/*
|
||||
* Private Properties
|
||||
* Private properties
|
||||
*/
|
||||
private $rankings = array();
|
||||
|
||||
/**
|
||||
* Construct player manager
|
||||
* Construct a new ranking manager instance
|
||||
*
|
||||
* @param \ManiaControl\ManiaControl $maniaControl
|
||||
* @param ManiaControl $maniaControl
|
||||
*/
|
||||
public function __construct(ManiaControl $maniaControl) {
|
||||
$this->maniaControl = $maniaControl;
|
||||
@ -37,7 +37,7 @@ class RankingManager implements CallbackListener {
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the Rankings (never call this Method)
|
||||
* Initialize the Rankings (never call this Method)
|
||||
*/
|
||||
public function onInit() {
|
||||
try {
|
||||
@ -124,4 +124,4 @@ class RankingManager implements CallbackListener {
|
||||
public function getPlayerRanking() {
|
||||
//TODO complete this
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,15 +15,11 @@ class ScriptManager {
|
||||
/*
|
||||
* Private Properties
|
||||
*/
|
||||
public $maniaControl = null;
|
||||
|
||||
/*
|
||||
* Private Properties
|
||||
*/
|
||||
private $maniaControl = null;
|
||||
private $isScriptMode = null;
|
||||
|
||||
/**
|
||||
* Construct a new Script Manager
|
||||
* Construct a new script manager instance
|
||||
*
|
||||
* @param ManiaControl $maniaControl
|
||||
*/
|
||||
@ -32,7 +28,7 @@ class ScriptManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable Script Callbacks
|
||||
* Enable script callbacks
|
||||
*
|
||||
* @param bool $enable
|
||||
* @return bool
|
||||
@ -56,7 +52,7 @@ class ScriptManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the Server is running in Script Mode
|
||||
* Check whether the Server is running in Script Mode
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
|
@ -10,7 +10,7 @@ use ManiaControl\Utils\CommandLineHelper;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\Exception;
|
||||
|
||||
/**
|
||||
* Class providing Access to the connected ManiaPlanet Server
|
||||
* Class providing access to the connected ManiaPlanet Server
|
||||
*
|
||||
* @author ManiaControl Team <mail@maniacontrol.com>
|
||||
* @copyright 2014 ManiaControl Team
|
||||
@ -24,7 +24,7 @@ class Server implements CallbackListener {
|
||||
const CB_TEAM_MODE_CHANGED = 'Server.TeamModeChanged';
|
||||
|
||||
/*
|
||||
* Public Properties
|
||||
* Public properties
|
||||
*/
|
||||
/** @var Config $config */
|
||||
public $config = null;
|
||||
@ -34,10 +34,15 @@ class Server implements CallbackListener {
|
||||
public $p2pPort = -1;
|
||||
public $login = null;
|
||||
public $titleId = null;
|
||||
/** @var Directory $directory */
|
||||
public $directory = null;
|
||||
/** @var Commands $commands */
|
||||
public $commands = null;
|
||||
/** @var UsageReporter $usageReporter */
|
||||
public $usageReporter = null;
|
||||
/** @var RankingManager $rankingManager */
|
||||
public $rankingManager = null;
|
||||
/** @var ScriptManager $scriptManager */
|
||||
public $scriptManager = null;
|
||||
|
||||
/*
|
||||
@ -92,6 +97,51 @@ class Server implements CallbackListener {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the server config
|
||||
*
|
||||
* @return Config
|
||||
*/
|
||||
public function getConfig() {
|
||||
return $this->config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the server directory
|
||||
*
|
||||
* @return Directory
|
||||
*/
|
||||
public function getDirectory() {
|
||||
return $this->directory;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the server commands
|
||||
*
|
||||
* @return Commands
|
||||
*/
|
||||
public function getCommands() {
|
||||
return $this->commands;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the usage reporter
|
||||
*
|
||||
* @return UsageReporter
|
||||
*/
|
||||
public function getUsageReporter() {
|
||||
return $this->usageReporter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the script manager
|
||||
*
|
||||
* @return ScriptManager
|
||||
*/
|
||||
public function getScriptManager() {
|
||||
return $this->scriptManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the Server Configuration from the Config XML
|
||||
*/
|
||||
|
Reference in New Issue
Block a user