refactor codestyle (chaining)
This commit is contained in:
@ -50,8 +50,7 @@ class PlayerDataManager {
|
||||
* @return bool
|
||||
*/
|
||||
private function initTables() {
|
||||
$mysqli = $this->maniaControl->getDatabase()
|
||||
->getMysqli();
|
||||
$mysqli = $this->maniaControl->getDatabase()->getMysqli();
|
||||
$defaultType = "'" . self::TYPE_STRING . "'";
|
||||
$typeSet = $defaultType . ",'" . self::TYPE_INT . "','" . self::TYPE_REAL . "','" . self::TYPE_BOOL . "','" . self::TYPE_ARRAY . "'";
|
||||
$query = "CREATE TABLE IF NOT EXISTS `" . self::TABLE_PLAYERDATAMETADATA . "` (
|
||||
@ -104,8 +103,7 @@ class PlayerDataManager {
|
||||
* Store Meta Data from the Database in the Ram
|
||||
*/
|
||||
private function storeMetaData() {
|
||||
$mysqli = $this->maniaControl->getDatabase()
|
||||
->getMysqli();
|
||||
$mysqli = $this->maniaControl->getDatabase()->getMysqli();
|
||||
|
||||
$query = "SELECT * FROM `" . self::TABLE_PLAYERDATAMETADATA . "`;";
|
||||
$result = $mysqli->query($query);
|
||||
@ -139,8 +137,7 @@ class PlayerDataManager {
|
||||
* @return bool
|
||||
*/
|
||||
public function defineMetaData($object, $dataName, $default, $dataDescription = '') {
|
||||
$mysqli = $this->maniaControl->getDatabase()
|
||||
->getMysqli();
|
||||
$mysqli = $this->maniaControl->getDatabase()->getMysqli();
|
||||
$className = ClassUtil::getClass($object);
|
||||
|
||||
$query = "INSERT INTO `" . self::TABLE_PLAYERDATAMETADATA . "` (
|
||||
@ -218,8 +215,7 @@ class PlayerDataManager {
|
||||
return $this->storedData[$player->index][$meta->dataId];
|
||||
}
|
||||
|
||||
$mysqli = $this->maniaControl->getDatabase()
|
||||
->getMysqli();
|
||||
$mysqli = $this->maniaControl->getDatabase()->getMysqli();
|
||||
$dataQuery = "SELECT `value` FROM `" . self::TABLE_PLAYERDATA . "`
|
||||
WHERE `dataId` = ?
|
||||
AND `playerId` = ?
|
||||
@ -275,8 +271,7 @@ class PlayerDataManager {
|
||||
return false;
|
||||
}
|
||||
|
||||
$mysqli = $this->maniaControl->getDatabase()
|
||||
->getMysqli();
|
||||
$mysqli = $this->maniaControl->getDatabase()->getMysqli();
|
||||
$query = "INSERT INTO `" . self::TABLE_PLAYERDATA . "` (
|
||||
`serverIndex`,
|
||||
`playerId`,
|
||||
|
Reference in New Issue
Block a user