diff --git a/application/core/Configurators/ManiaControlSettings.php b/application/core/Configurators/ManiaControlSettings.php index 1fed4eda..82e54f93 100644 --- a/application/core/Configurators/ManiaControlSettings.php +++ b/application/core/Configurators/ManiaControlSettings.php @@ -16,7 +16,7 @@ use ManiaControl\Callbacks\CallbackManager; use ManiaControl\ManiaControl; use ManiaControl\Players\Player; use ManiaControl\Players\PlayerManager; -use ManiaControl\Settings\SettingManager; +use ManiaControl\Settings\Setting; /** * Class offering a Configurator for ManiaControl Settings @@ -173,7 +173,7 @@ class ManiaControlSettings implements ConfiguratorMenu, CallbackListener { $nameLabel->setText($setting->setting); $nameLabel->setTextColor("FFF"); - if ($setting->type === SettingManager::TYPE_BOOL) { + if ($setting->type === Setting::TYPE_BOOL) { $quad = new Quad_Icons64x64_1(); $settingFrame->add($quad); $quad->setX($width / 2 * 0.6); diff --git a/application/core/Files/FileUtil.php b/application/core/Files/FileUtil.php index cb7a594b..68d2dd14 100644 --- a/application/core/Files/FileUtil.php +++ b/application/core/Files/FileUtil.php @@ -2,7 +2,7 @@ namespace ManiaControl\Files; -use ManiaControl\Formatter; +use ManiaControl\Utils\Formatter; use ManiaControl\ManiaControl; /** diff --git a/application/core/ManiaControl.php b/application/core/ManiaControl.php index 1f5cfd29..e9922607 100644 --- a/application/core/ManiaControl.php +++ b/application/core/ManiaControl.php @@ -23,6 +23,8 @@ use ManiaControl\Server\Server; use ManiaControl\Settings\SettingManager; use ManiaControl\Statistics\StatisticManager; use ManiaControl\Update\UpdateManager; +use ManiaControl\Utils\CommandLineHelper; +use ManiaControl\Utils\Formatter; use Maniaplanet\DedicatedServer\Connection; use Maniaplanet\DedicatedServer\Xmlrpc\Exception; use Maniaplanet\DedicatedServer\Xmlrpc\TransportException; diff --git a/application/core/ManiaExchange/MXMapInfo.php b/application/core/ManiaExchange/MXMapInfo.php index 57760243..d5fe6c09 100644 --- a/application/core/ManiaExchange/MXMapInfo.php +++ b/application/core/ManiaExchange/MXMapInfo.php @@ -2,7 +2,7 @@ namespace ManiaControl\ManiaExchange; -use ManiaControl\Formatter; +use ManiaControl\Utils\Formatter; /** * Mania Exchange Map Info Object diff --git a/application/core/ManiaExchange/ManiaExchangeList.php b/application/core/ManiaExchange/ManiaExchangeList.php index 98934715..886fa3f5 100644 --- a/application/core/ManiaExchange/ManiaExchangeList.php +++ b/application/core/ManiaExchange/ManiaExchangeList.php @@ -16,8 +16,8 @@ use FML\ManiaLink; use FML\Script\Features\Paging; use ManiaControl\Callbacks\CallbackListener; use ManiaControl\Callbacks\CallbackManager; -use ManiaControl\ColorUtil; -use ManiaControl\Formatter; +use ManiaControl\Utils\ColorUtil; +use ManiaControl\Utils\Formatter; use ManiaControl\ManiaControl; use ManiaControl\Manialinks\IconManager; use ManiaControl\Manialinks\ManialinkManager; diff --git a/application/core/Maps/Map.php b/application/core/Maps/Map.php index f30f94ce..f30d8a53 100644 --- a/application/core/Maps/Map.php +++ b/application/core/Maps/Map.php @@ -2,7 +2,7 @@ namespace ManiaControl\Maps; -use ManiaControl\Formatter; +use ManiaControl\Utils\Formatter; use ManiaControl\ManiaExchange\MXMapInfo; /** @@ -53,7 +53,7 @@ class Map { if (!$mpMap) { return; } - $this->name = FORMATTER::stripDirtyCodes($mpMap->name); + $this->name = Formatter::stripDirtyCodes($mpMap->name); $this->rawName = $mpMap->name; $this->uid = $mpMap->uId; $this->fileName = $mpMap->fileName; diff --git a/application/core/Maps/MapList.php b/application/core/Maps/MapList.php index be0452c6..8e8ea8ba 100644 --- a/application/core/Maps/MapList.php +++ b/application/core/Maps/MapList.php @@ -17,8 +17,8 @@ use FML\Script\Features\Paging; use ManiaControl\Callbacks\CallbackListener; use ManiaControl\Callbacks\CallbackManager; use ManiaControl\Callbacks\Callbacks; -use ManiaControl\ColorUtil; -use ManiaControl\Formatter; +use ManiaControl\Utils\ColorUtil; +use ManiaControl\Utils\Formatter; use ManiaControl\ManiaControl; use ManiaControl\Manialinks\IconManager; use ManiaControl\Manialinks\ManialinkManager; diff --git a/application/core/Maps/MapQueue.php b/application/core/Maps/MapQueue.php index 2ce37b4e..07b3e893 100644 --- a/application/core/Maps/MapQueue.php +++ b/application/core/Maps/MapQueue.php @@ -7,7 +7,7 @@ use ManiaControl\Callbacks\CallbackListener; use ManiaControl\Callbacks\CallbackManager; use ManiaControl\Callbacks\Callbacks; use ManiaControl\Commands\CommandListener; -use ManiaControl\Formatter; +use ManiaControl\Utils\Formatter; use ManiaControl\ManiaControl; use ManiaControl\Players\Player; use Maniaplanet\DedicatedServer\Xmlrpc\NextMapException; diff --git a/application/core/Players/Player.php b/application/core/Players/Player.php index b316934d..8ebe875c 100644 --- a/application/core/Players/Player.php +++ b/application/core/Players/Player.php @@ -2,7 +2,7 @@ namespace ManiaControl\Players; -use ManiaControl\Formatter; +use ManiaControl\Utils\Formatter; use ManiaControl\ManiaControl; /** diff --git a/application/core/Players/PlayerActions.php b/application/core/Players/PlayerActions.php index 9ad76e2e..06832342 100644 --- a/application/core/Players/PlayerActions.php +++ b/application/core/Players/PlayerActions.php @@ -8,7 +8,7 @@ use FML\Controls\Quad; use FML\Controls\Quads\Quad_Icons64x64_1; use FML\ManiaLink; use ManiaControl\Admin\AuthenticationManager; -use ManiaControl\Formatter; +use ManiaControl\Utils\Formatter; use ManiaControl\ManiaControl; use ManiaControl\Manialinks\ManialinkManager; use Maniaplanet\DedicatedServer\Xmlrpc\Exception; diff --git a/application/core/Players/PlayerDetailed.php b/application/core/Players/PlayerDetailed.php index f0dd4a13..54a81d74 100644 --- a/application/core/Players/PlayerDetailed.php +++ b/application/core/Players/PlayerDetailed.php @@ -10,7 +10,7 @@ use FML\Controls\Quad; use FML\Controls\Quads\Quad_BgsPlayerCard; use FML\ManiaLink; use FML\Script\Script; -use ManiaControl\Formatter; +use ManiaControl\Utils\Formatter; use ManiaControl\ManiaControl; use ManiaControl\Manialinks\ManialinkManager; use ManiaControl\Statistics\StatisticManager; diff --git a/application/core/Players/PlayerList.php b/application/core/Players/PlayerList.php index 10ebeedc..de0117ea 100644 --- a/application/core/Players/PlayerList.php +++ b/application/core/Players/PlayerList.php @@ -18,7 +18,7 @@ use ManiaControl\Admin\AuthenticationManager; use ManiaControl\Callbacks\CallbackListener; use ManiaControl\Callbacks\CallbackManager; use ManiaControl\Callbacks\TimerListener; -use ManiaControl\Formatter; +use ManiaControl\Utils\Formatter; use ManiaControl\ManiaControl; use ManiaControl\Manialinks\ManialinkManager; use ManiaControl\Manialinks\ManialinkPageAnswerListener; diff --git a/application/core/Players/PlayerManager.php b/application/core/Players/PlayerManager.php index 8a2bbac3..6cbed38f 100644 --- a/application/core/Players/PlayerManager.php +++ b/application/core/Players/PlayerManager.php @@ -6,7 +6,7 @@ use ManiaControl\Admin\AdminLists; use ManiaControl\Callbacks\CallbackListener; use ManiaControl\Callbacks\CallbackManager; use ManiaControl\Callbacks\TimerListener; -use ManiaControl\Formatter; +use ManiaControl\Utils\Formatter; use ManiaControl\ManiaControl; use ManiaControl\Statistics\StatisticManager; use Maniaplanet\DedicatedServer\Xmlrpc\LoginUnknownException; diff --git a/application/core/Plugins/PluginMenu.php b/application/core/Plugins/PluginMenu.php index edc2caf7..34ee774c 100644 --- a/application/core/Plugins/PluginMenu.php +++ b/application/core/Plugins/PluginMenu.php @@ -20,7 +20,7 @@ use ManiaControl\Configurators\ConfiguratorMenu; use ManiaControl\ManiaControl; use ManiaControl\Manialinks\ManialinkPageAnswerListener; use ManiaControl\Players\Player; -use ManiaControl\Settings\SettingManager; +use ManiaControl\Settings\Setting; /** * Configurator for enabling and disabling Plugins @@ -254,7 +254,7 @@ class PluginMenu implements CallbackListener, ConfiguratorMenu, ManialinkPageAns $y = 0; $index = 0; $settingHeight = 5.; - $pageFrame = null; + $pageFrame = null; foreach ($settings as $setting) { if ($index % $pageSettingsMaxCount === 0) { @@ -311,7 +311,7 @@ class PluginMenu implements CallbackListener, ConfiguratorMenu, ManialinkPageAns $entry->setDefault($setting->value); - if ($setting->type === SettingManager::TYPE_BOOL) { + if ($setting->type === Setting::TYPE_BOOL) { if ($setting->value == "0") { $substyle = Quad_Icons64x64_1::SUBSTYLE_LvlRed; } else if ($setting->value == "1") { @@ -389,7 +389,7 @@ class PluginMenu implements CallbackListener, ConfiguratorMenu, ManialinkPageAns } } else if ($settings) { // Open Settings Menu - $pluginClass = substr($actionId, strlen(self::ACTION_PREFIX_SETTINGS)); + $pluginClass = substr($actionId, strlen(self::ACTION_PREFIX_SETTINGS)); $player->setCache($this, self::CACHE_SETTING_CLASS, $pluginClass); } else if ($boolSetting) { $actionArray = explode(".", $actionId); diff --git a/application/core/Server/Server.php b/application/core/Server/Server.php index 7dfc05e7..9130db9f 100644 --- a/application/core/Server/Server.php +++ b/application/core/Server/Server.php @@ -4,7 +4,7 @@ namespace ManiaControl\Server; use ManiaControl\Callbacks\CallbackListener; use ManiaControl\Callbacks\CallbackManager; -use ManiaControl\CommandLineHelper; +use ManiaControl\Utils\CommandLineHelper; use ManiaControl\ManiaControl; use Maniaplanet\DedicatedServer\Xmlrpc\Exception; diff --git a/application/core/Server/UsageReporter.php b/application/core/Server/UsageReporter.php index a3ac5370..765c1f12 100644 --- a/application/core/Server/UsageReporter.php +++ b/application/core/Server/UsageReporter.php @@ -3,7 +3,7 @@ namespace ManiaControl\Server; use ManiaControl\Callbacks\TimerListener; -use ManiaControl\Formatter; +use ManiaControl\Utils\Formatter; use ManiaControl\ManiaControl; use ManiaControl\Plugins\Plugin; use Maniaplanet\DedicatedServer\Xmlrpc\Exception; diff --git a/application/core/Settings/Setting.php b/application/core/Settings/Setting.php index 32d8d7ab..319b4b1c 100644 --- a/application/core/Settings/Setting.php +++ b/application/core/Settings/Setting.php @@ -2,7 +2,7 @@ namespace ManiaControl\Settings; -use ManiaControl\ClassUtil; +use ManiaControl\Utils\ClassUtil; /** * Model Class for a Setting diff --git a/application/core/Settings/SettingManager.php b/application/core/Settings/SettingManager.php index 6c4d190e..8678aa22 100644 --- a/application/core/Settings/SettingManager.php +++ b/application/core/Settings/SettingManager.php @@ -4,9 +4,9 @@ namespace ManiaControl\Settings; use ManiaControl\Callbacks\CallbackListener; use ManiaControl\Callbacks\CallbackManager; -use ManiaControl\ClassUtil; use ManiaControl\ManiaControl; use ManiaControl\Plugins\PluginManager; +use ManiaControl\Utils\ClassUtil; /** * Class managing Settings and Configurations @@ -132,7 +132,7 @@ class SettingManager implements CallbackListener { * @return Setting */ public function setSetting($object, $settingName, $value) { - $className = $this->getClassName($object); + $className = ClassUtil::getClass($object); $setting = $this->getSetting($object, $settingName); if ($setting) { diff --git a/application/core/Statistics/SimpleStatsList.php b/application/core/Statistics/SimpleStatsList.php index a4fdc687..80769db1 100644 --- a/application/core/Statistics/SimpleStatsList.php +++ b/application/core/Statistics/SimpleStatsList.php @@ -14,7 +14,7 @@ use FML\ManiaLink; use ManiaControl\Callbacks\CallbackListener; use ManiaControl\Callbacks\CallbackManager; use ManiaControl\Commands\CommandListener; -use ManiaControl\Formatter; +use ManiaControl\Utils\Formatter; use ManiaControl\ManiaControl; use ManiaControl\Manialinks\ManialinkManager; use ManiaControl\Manialinks\ManialinkPageAnswerListener; diff --git a/application/core/ClassUtil.php b/application/core/Utils/ClassUtil.php similarity index 95% rename from application/core/ClassUtil.php rename to application/core/Utils/ClassUtil.php index 3f0cb823..438eda6f 100644 --- a/application/core/ClassUtil.php +++ b/application/core/Utils/ClassUtil.php @@ -1,6 +1,6 @@