public function backup_migrate_files_destination_archivesource::_array_to_ini in Backup and Migrate 7.3
Same name and namespace in other branches
- 8.3 includes/sources.archivesource.inc \backup_migrate_files_destination_archivesource::_array_to_ini()
- 6.3 includes/sources.archivesource.inc \backup_migrate_files_destination_archivesource::_array_to_ini()
Converts an associated array to an ini format string.
Only allows 2 levels of depth to allow parse_ini_file to parse.
1 call to backup_migrate_files_destination_archivesource::_array_to_ini()
- backup_migrate_files_destination_archivesource::generate_manifest in includes/
sources.archivesource.inc - Generates a manifest file.
File
- includes/
sources.archivesource.inc, line 293 - A destination type for saving locally to the server.
Class
- backup_migrate_files_destination_archivesource
- A destination type for saving locally to the server.
Code
public function _array_to_ini($sections) {
$content = "";
foreach ($sections as $section => $data) {
$content .= '[' . $section . ']' . "\n";
foreach ($data as $key => $val) {
$content .= $key . " = \"" . $val . "\"\n";
}
$content .= "\n";
}
return $content;
}