mirror of
https://github.com/Chouchen/Shikiryu_Backup.git
synced 2021-06-30 16:02:14 +02:00
Added options and Dropbox
This commit is contained in:
@@ -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.");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user