Added options and Dropbox

This commit is contained in:
Shikiryu
2015-08-18 17:02:37 +02:00
parent bf551dd6ff
commit 41391be79c
7 changed files with 223 additions and 48 deletions

View File

@@ -40,16 +40,20 @@ class Scenario {
$this->transport = TransportFactory::build($this->backup, $scenario['transport']);
}
/**
* check if backup is valid and then launch the transfer
*
* @see BackupAbstract::isValid
* @see TransportAbstract::send
*
* @throws \Exception
*/
public function send()
{
try {
if ($this->backup->isValid()) {
$this->transport->send();
} else {
throw new \Exception("Backup configuration is invalid.");
}
} catch (\Exception $e) {
throw $e;
if ($this->backup->isValid()) {
$this->transport->send();
} else {
throw new \Exception("Backup configuration is invalid.");
}
}