Added options and Dropbox

This commit is contained in:
Shikiryu committed 2015-08-18 17:02:55 +02:00
1 parent bf551dd6ff
commit 41391be79c
7 files changed
+223 -48

No files matched your search

+12 -8
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.");
}
}