current = new stdClass(); } else { $this->current = json_decode(file_get_contents($path)); } } // -------------------------------------------------------------------------- /** * Save the settings file on close, just to be safe */ function __destruct() { file_put_contents(json_encode($this->current), BASE_DIR.'/settings.json'); } // -------------------------------------------------------------------------- /** * Add a database connection * * @param string $type * @param string $host * @param string $user * @param string $pass */ function add_db($type, $host, $user, $pass) { } } // End of settings.php