protected function SidecarMetadataDestinationTrait::_arrayToINI in Backup and Migrate 8.4
Parameters
$data:
string $prefix:
Return value
string
1 call to SidecarMetadataDestinationTrait::_arrayToINI()
- SidecarMetadataDestinationTrait::_saveFileMetadata in lib/
backup_migrate_core/ src/ Destination/ SidecarMetadataDestinationTrait.php
File
- lib/
backup_migrate_core/ src/ Destination/ SidecarMetadataDestinationTrait.php, line 106
Class
- SidecarMetadataDestinationTrait
- Class SidecarMetadataDestinationTrait.
Namespace
BackupMigrate\Core\DestinationCode
protected function _arrayToINI($data, $prefix = '') {
$content = "";
foreach ($data as $key => $val) {
if ($prefix) {
$key = $prefix . '[' . $key . ']';
}
if (is_array($val)) {
$content .= $this
->_arrayToINI($val, $key);
}
else {
$content .= $key . " = \"" . $val . "\"\n";
}
}
return $content;
}