renamed database config class

This commit is contained in:
Steffen Schröder 2014-06-20 19:06:55 +02:00
parent 3922b6eac7
commit 816ff486ef
2 changed files with 9 additions and 9 deletions

View File

@ -9,7 +9,7 @@ namespace ManiaControl\Database;
* @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 DatabaseConfig { class Config {
/* /*
* Public Properties * Public Properties
*/ */
@ -20,13 +20,13 @@ class DatabaseConfig {
public $name = null; public $name = null;
/** /**
* Create a new Server Config Instance * Create a new Database Config Instance
* *
* @param string $host Server Ip * @param string $host
* @param string $port Server Port * @param string $port
* @param string $user User * @param string $user
* @param string $pass Password * @param string $pass
* @param string $name Name * @param string $name
*/ */
public function __construct($host = null, $port = null, $user = null, $pass = null, $name = null) { public function __construct($host = null, $port = null, $user = null, $pass = null, $name = null) {
$this->host = (string)$host; $this->host = (string)$host;

View File

@ -23,7 +23,7 @@ class Database implements TimerListener {
* Private Properties * Private Properties
*/ */
private $maniaControl = null; private $maniaControl = null;
/** @var DatabaseConfig $config */ /** @var Config $config */
private $config = null; private $config = null;
/** /**
@ -105,7 +105,7 @@ class Database implements TimerListener {
$name = (string)$nameElements[0]; $name = (string)$nameElements[0];
// Create config object // Create config object
$config = new DatabaseConfig($host, $port, $user, $pass, $name); $config = new Config($host, $port, $user, $pass, $name);
if (!$config->validate()) { if (!$config->validate()) {
$this->maniaControl->quit("Your config file doesn't seem to be maintained properly. Please check the database configuration again!", true); $this->maniaControl->quit("Your config file doesn't seem to be maintained properly. Please check the database configuration again!", true);
} }