| @@ 122-130 (lines=9) @@ | ||
| 119 | * @param \phpbu\App\Backup\Target $target |
|
| 120 | * @throws \Exception |
|
| 121 | */ |
|
| 122 | protected function executeSource(Configuration\Backup $conf, Target $target) |
|
| 123 | { |
|
| 124 | $this->result->backupStart($conf); |
|
| 125 | /* @var \phpbu\App\Runner\Source $runner */ |
|
| 126 | $source = $this->factory->createSource($conf->getSource()->type, $conf->getSource()->options); |
|
| 127 | $status = $source->backup($target, $this->result); |
|
| 128 | $this->compress($status, $target, $this->result); |
|
| 129 | $this->result->backupEnd($conf); |
|
| 130 | } |
|
| 131 | ||
| 132 | /** |
|
| 133 | * Execute checks. |
|
| @@ 67-78 (lines=12) @@ | ||
| 64 | * @param \phpbu\App\Backup\Target $target |
|
| 65 | * @throws \Exception |
|
| 66 | */ |
|
| 67 | protected function simulateSource(Configuration\Backup $conf, Target $target) |
|
| 68 | { |
|
| 69 | $this->result->backupStart($conf); |
|
| 70 | /* @var \phpbu\App\Runner\Source $runner */ |
|
| 71 | $source = $this->factory->createSource($conf->getSource()->type, $conf->getSource()->options); |
|
| 72 | ||
| 73 | if ($source instanceof Backup\Source\Simulator) { |
|
| 74 | $status = $source->simulate($target, $this->result); |
|
| 75 | $this->compress($status, $target, $this->result); |
|
| 76 | } |
|
| 77 | $this->result->backupEnd($conf); |
|
| 78 | } |
|
| 79 | ||
| 80 | /** |
|
| 81 | * Simulate checks. |
|