renamed server config class

This commit is contained in:
Steffen Schröder 2014-06-20 19:05:59 +02:00
parent 14e92a10b8
commit 3922b6eac7
2 changed files with 8 additions and 8 deletions

View File

@ -9,7 +9,7 @@ namespace ManiaControl\Server;
* @copyright 2014 ManiaControl Team * @copyright 2014 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/ */
class ServerConfig { class Config {
/* /*
* Public Properties * Public Properties
*/ */
@ -22,11 +22,11 @@ class ServerConfig {
/** /**
* Create a new Server Config Instance * Create a new Server Config Instance
* *
* @param mixed $id Config Id * @param mixed $id
* @param mixed $host Server Ip * @param mixed $host
* @param mixed $port Server Port * @param mixed $port
* @param mixed $user XmlRpc User * @param mixed $user
* @param mixed $pass XmlRpc Password * @param mixed $pass
*/ */
public function __construct($id = null, $host = null, $port = null, $user = null, $pass = null) { public function __construct($id = null, $host = null, $port = null, $user = null, $pass = null) {
$this->id = $this->extractConfigData($id); $this->id = $this->extractConfigData($id);

View File

@ -26,7 +26,7 @@ class Server implements CallbackListener {
/* /*
* Public Properties * Public Properties
*/ */
/** @var ServerConfig $config */ /** @var Config $config */
public $config = null; public $config = null;
public $index = -1; public $index = -1;
public $ip = null; public $ip = null;
@ -125,7 +125,7 @@ class Server implements CallbackListener {
$passElements = $serverElement->xpath('pass'); $passElements = $serverElement->xpath('pass');
// Create config object // Create config object
$config = new ServerConfig($serverId, $hostElements, $portElements, $userElements, $passElements); $config = new Config($serverId, $hostElements, $portElements, $userElements, $passElements);
$message = null; $message = null;
if (!$config->validate($message)) { if (!$config->validate($message)) {
$this->maniaControl->quit("Your config file doesn't seem to be maintained properly. Please check the server configuration again! {$message}", true); $this->maniaControl->quit("Your config file doesn't seem to be maintained properly. Please check the server configuration again! {$message}", true);