1 | <?php |
||
23 | class Dropbox implements Simulator |
||
24 | { |
||
25 | /** |
||
26 | * API access token |
||
27 | * |
||
28 | * Goto https://www.dropbox.com/developers/apps |
||
29 | * create your app |
||
30 | * - Dropbox api app |
||
31 | * - files and datastore |
||
32 | * - yes |
||
33 | * - provide some app name "my-dropbox-app" |
||
34 | * - generate access token to authenticate connection to your dropbox |
||
35 | * |
||
36 | * @var string |
||
37 | */ |
||
38 | protected $token; |
||
39 | |||
40 | /** |
||
41 | * Remote path |
||
42 | * |
||
43 | * @var string |
||
44 | */ |
||
45 | protected $path; |
||
46 | |||
47 | /** |
||
48 | * (non-PHPDoc) |
||
49 | * |
||
50 | * @see \phpbu\App\Backup\Sync::setup() |
||
51 | * @param array $config |
||
52 | * @throws \phpbu\App\Backup\Sync\Exception |
||
53 | 3 | */ |
|
54 | public function setup(array $config) |
||
68 | |||
69 | /** |
||
70 | * (non-PHPDoc) |
||
71 | * |
||
72 | * @see \phpbu\App\Backup\Sync::sync() |
||
73 | * @param \phpbu\App\Backup\Target $target |
||
74 | * @param \phpbu\App\Result $result |
||
75 | * @throws \phpbu\App\Backup\Sync\Exception |
||
76 | */ |
||
77 | public function sync(Target $target, Result $result) |
||
91 | |||
92 | /** |
||
93 | * Simulate the sync execution. |
||
94 | * |
||
95 | * @param \phpbu\App\Backup\Target $target |
||
96 | * @param \phpbu\App\Result $result |
||
97 | */ |
||
98 | public function simulate(Target $target, Result $result) |
||
106 | } |
||
107 |