1 | <?php |
||
23 | class AmazonS3v3 extends Collector |
||
24 | { |
||
25 | use Path; |
||
26 | |||
27 | /** |
||
28 | * @var \Aws\S3\S3Client |
||
29 | */ |
||
30 | protected $client; |
||
31 | |||
32 | /** |
||
33 | * AmazonS3 bucket name |
||
34 | * |
||
35 | * @var string |
||
36 | */ |
||
37 | protected $bucket; |
||
38 | |||
39 | /** |
||
40 | * OpenStack constructor. |
||
41 | * |
||
42 | * @param \phpbu\App\Backup\Target $target |
||
43 | * @param S3Client $client |
||
44 | * @param string $bucket |
||
45 | * @param string $path |
||
46 | * @param int $time |
||
47 | */ |
||
48 | 1 | public function __construct(Target $target, S3Client $client, string $bucket, string $path, int $time) |
|
55 | |||
56 | /** |
||
57 | * Get all created backups. |
||
58 | * |
||
59 | * @return \phpbu\App\Backup\File[] |
||
60 | */ |
||
61 | 1 | public function getBackupFiles() : array |
|
84 | |||
85 | /** |
||
86 | * Return prefix for querying remote files and folders |
||
87 | * |
||
88 | * @param string|null $path |
||
89 | * @return string |
||
90 | */ |
||
91 | 1 | protected function getPrefix($path = null): string |
|
98 | } |
||
99 |