You are here

function backup_migrate_files_destination_archivesource::_array_to_ini in Backup and Migrate 6.3

Same name and namespace in other branches
  1. 8.3 includes/sources.archivesource.inc \backup_migrate_files_destination_archivesource::_array_to_ini()
  2. 7.3 includes/sources.archivesource.inc \backup_migrate_files_destination_archivesource::_array_to_ini()

Convert 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
Generate a manifest file.

File

includes/sources.archivesource.inc, line 267
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

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;
}