private get_config_file ( ) : string | ||
Результат | string | The config.php template for the db_type schema |
private function get_config_file()
{
if (!($file_contents = file_get_contents(HABARI_PATH . "/system/schema/" . $this->handler_vars['db_type'] . "/config.php"))) {
return false;
}
$vars = array();
foreach ($this->handler_vars as $k => $v) {
$vars[$k] = addslashes($v);
}
$keys = array();
foreach (array_keys($vars) as $v) {
$keys[] = Utils::map_array($v);
}
$file_contents = str_replace($keys, $vars, $file_contents);
return $file_contents;
}