| 1 | <?php |
||
| 20 | abstract class Sync implements Simulator |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * Unix timestamp of generating path from placeholder. |
||
| 24 | * |
||
| 25 | * @var int |
||
| 26 | */ |
||
| 27 | protected $time; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Setup the Sync object with all xml options. |
||
| 31 | * |
||
| 32 | * @param array $options |
||
| 33 | */ |
||
| 34 | abstract public function setup(array $options); |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Execute the Sync |
||
| 38 | * Copy your backup to another location |
||
| 39 | * |
||
| 40 | * @param \phpbu\App\Backup\Target $target |
||
| 41 | * @param \phpbu\App\Result $result |
||
| 42 | */ |
||
| 43 | abstract public function sync(Target $target, Result $result); |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Make sure all mandatory keys are present in given config. |
||
| 47 | * |
||
| 48 | * @param array $config |
||
| 49 | * @param array $keys |
||
| 50 | * @throws Exception |
||
| 51 | */ |
||
| 52 | 30 | protected function validateConfig(array $config, array $keys) |
|
| 60 | } |
||
| 61 |