1 | <?php |
||
20 | abstract class AmazonS3 extends SyncInterface |
||
21 | { |
||
22 | /** |
||
23 | * AWS key |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $key; |
||
28 | |||
29 | /** |
||
30 | * AWS secret |
||
31 | * |
||
32 | * @var string |
||
33 | */ |
||
34 | protected $secret; |
||
35 | |||
36 | /** |
||
37 | * AWS S3 bucket |
||
38 | * |
||
39 | * @var string |
||
40 | */ |
||
41 | protected $bucket; |
||
42 | |||
43 | /** |
||
44 | * TTL for all items in this bucket. |
||
45 | * |
||
46 | * @var int |
||
47 | */ |
||
48 | protected $bucketTTL; |
||
49 | |||
50 | /** |
||
51 | * AWS S3 region |
||
52 | * |
||
53 | * @var string |
||
54 | */ |
||
55 | protected $region; |
||
56 | |||
57 | /** |
||
58 | * AWS remote path / object key |
||
59 | * |
||
60 | * @var string |
||
61 | */ |
||
62 | protected $path; |
||
63 | |||
64 | /** |
||
65 | * AWS remote raw path / object key |
||
66 | * |
||
67 | * @var string |
||
68 | */ |
||
69 | protected $pathRaw; |
||
70 | |||
71 | /** |
||
72 | * AWS acl |
||
73 | * 'private' by default |
||
74 | * |
||
75 | * @var string |
||
76 | */ |
||
77 | protected $acl; |
||
78 | |||
79 | /** |
||
80 | * Use multi part config |
||
81 | * |
||
82 | * @var boolean |
||
83 | */ |
||
84 | protected $multiPartUpload; |
||
85 | |||
86 | /** |
||
87 | * Min multi part upload size |
||
88 | * |
||
89 | * @var int |
||
90 | */ |
||
91 | protected $minMultiPartUploadSize = 5242880; |
||
92 | |||
93 | /** |
||
94 | * Max stream upload size |
||
95 | * |
||
96 | * @var int |
||
97 | */ |
||
98 | protected $maxStreamUploadSize = 104857600; |
||
99 | |||
100 | /** |
||
101 | * Configure the sync. |
||
102 | * |
||
103 | * @see \phpbu\App\Backup\Sync::setup() |
||
104 | * @param array $config |
||
105 | * @throws \phpbu\App\Backup\Sync\Exception |
||
106 | */ |
||
107 | 9 | public function setup(array $config) |
|
127 | |||
128 | /** |
||
129 | * Simulate the sync execution. |
||
130 | * |
||
131 | * @param \phpbu\App\Backup\Target $target |
||
132 | * @param \phpbu\App\Result $result |
||
133 | */ |
||
134 | 1 | public function simulate(Target $target, Result $result) |
|
144 | |||
145 | /** |
||
146 | * Should multi part upload be used. |
||
147 | * |
||
148 | * @param \phpbu\App\Backup\Target $target |
||
149 | * @return bool |
||
150 | * @throws \phpbu\App\Exception |
||
151 | */ |
||
152 | protected function useMultiPartUpload(Target $target) |
||
160 | } |
||
161 |