1 | <?php |
||
22 | class SoftLayer implements Simulator |
||
23 | { |
||
24 | /** |
||
25 | * SoftLayer user |
||
26 | * |
||
27 | * @var string |
||
28 | */ |
||
29 | protected $user; |
||
30 | |||
31 | /** |
||
32 | * SoftLayer secret |
||
33 | * |
||
34 | * @var string |
||
35 | */ |
||
36 | protected $secret; |
||
37 | |||
38 | /** |
||
39 | * SoftLayer container |
||
40 | * |
||
41 | * @var string |
||
42 | */ |
||
43 | protected $container; |
||
44 | |||
45 | /** |
||
46 | * SoftLayer host |
||
47 | * |
||
48 | * @var string |
||
49 | */ |
||
50 | protected $host; |
||
51 | |||
52 | /** |
||
53 | * SoftLayer remote path |
||
54 | * |
||
55 | * @var string |
||
56 | */ |
||
57 | protected $path; |
||
58 | |||
59 | /** |
||
60 | * (non-PHPDoc) |
||
61 | * |
||
62 | * @see \phpbu\App\Backup\Sync::setup() |
||
63 | * @param array $config |
||
64 | * @throws \phpbu\App\Backup\Sync\Exception |
||
65 | */ |
||
66 | 7 | public function setup(array $config) |
|
82 | 2 | ||
83 | 2 | /** |
|
84 | * Make sure all mandatory keys are present in given config. |
||
85 | 2 | * |
|
86 | * @param array $config |
||
87 | * @param string[] $keys |
||
88 | * @throws Exception |
||
89 | */ |
||
90 | protected function validateConfig(array $config, array $keys) |
||
98 | |||
99 | /** |
||
100 | * (non-PHPDoc) |
||
101 | * |
||
102 | * @see \phpbu\App\Backup\Sync::sync() |
||
103 | * @param \phpbu\App\backup\Target $target |
||
104 | * @param \phpbu\App\Result $result |
||
105 | * @throws \phpbu\App\Backup\Sync\Exception |
||
106 | */ |
||
107 | public function sync(Target $target, Result $result) |
||
131 | 1 | ||
132 | 1 | /** |
|
133 | 1 | * Simulate the sync execution. |
|
134 | 1 | * |
|
135 | * @param \phpbu\App\Backup\Target $target |
||
136 | 1 | * @param \phpbu\App\Result $result |
|
137 | */ |
||
138 | public function simulate(Target $target, Result $result) |
||
149 | } |
||
150 |