public function saveDbConfig($db) { if ($this->checkDbConn($db["host"], $db["username"], $db["password"], $db["database"])) { $data = '<?php class PayqrModuleDbConfig { public static $username = "******"username"] . '"; public static $password = "******"password"] . '"; public static $database = "' . $db["database"] . '"; public static $host = "' . $db["host"] . '"; public static $prefix = "' . $db["prefix"] . '"; }'; $file = PAYQR_ROOT . "module/orm/PayqrModuleDbConfig.php"; file_put_contents($file, $data); PayqrModuleDbConfig::setConfig($db); $this->createTables(); return true; } else { return false; } }