Make backupMode an attribute

Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
Pablo Zmdl 2026-01-19 12:58:50 +01:00
parent 419eede1c0
commit af76dbaeeb
3 changed files with 13 additions and 23 deletions

View file

@ -38,6 +38,11 @@ class ConfigurationManager
set { $this->set('selected-restore-time', $value); }
}
public string $backupMode {
get => $this->get('backup-mode', '');
set { $this->set('backup-mode', $value); }
}
public string $AIO_URL {
get => $this->get('AIO_URL', '');
set { $this->set('AIO_URL', $value); }
@ -452,21 +457,6 @@ class ConfigurationManager
return 'dc=' . implode(',dc=', explode('.', $domain));
}
public function GetBackupMode() : string {
$config = $this->GetConfig();
if(!isset($config['backup-mode'])) {
$config['backup-mode'] = '';
}
return $config['backup-mode'];
}
public function SetBackupMode(string $mode) : void {
$config = $this->GetConfig();
$config['backup-mode'] = $mode;
$this->WriteConfig($config);
}
/**
* @throws InvalidSettingConfigurationException
*/