You are here

function backup_migrate_files_destination_archivesource::read_manifest in Backup and Migrate 8.3

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

Generate a manifest file.

1 call to backup_migrate_files_destination_archivesource::read_manifest()
backup_migrate_files_destination_archivesource::_restore_from_file_php in includes/sources.archivesource.inc
Restore to this source.

File

includes/sources.archivesource.inc, line 242
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 read_manifest($directory) {

  // Assume some defaults if values ore the manifest is missing.
  $defaults = array(
    'docroot' => 'docroot',
    'database-file-default' => 'database.sql',
    'database-file-driver' => 'mysql',
  );
  $out = $this
    ->_ini_to_array($directory . '/MANIFEST.ini');

  // Set the defaults.
  $out['Site 0'] = isset($out['Site 0']) ? $out['Site 0'] : array();
  $out['Site 0'] += $defaults;
  return $out;
}