-
Notifications
You must be signed in to change notification settings - Fork 65
/
DOSpaces.php
51 lines (45 loc) · 1.12 KB
/
DOSpaces.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
namespace Utopia\Storage\Device;
use Utopia\Storage\Device\S3;
class DOSpaces extends S3
{
/**
* Regions constants
*
*/
const SGP1 = 'sgp1';
const NYC3 = 'nyc3';
const FRA1 = 'fra1';
const SFO2 = 'sfo2';
const SFO3 = 'sfo3';
const AMS3 = 'AMS3';
/**
* DOSpaces Constructor
*
* @param string $root
* @param string $accessKey
* @param string $secretKey
* @param string $bucket
* @param string $region
* @param string $acl
*/
public function __construct(string $root, string $accessKey, string $secretKey, string $bucket, string $region = self::NYC3, string $acl = self::ACL_PRIVATE)
{
parent::__construct($root, $accessKey, $secretKey, $bucket, $region, $acl);
$this->headers['host'] = $bucket . '.' . $region . '.digitaloceanspaces.com';
}
/**
* @return string
*/
public function getName(): string
{
return 'Digitalocean Spaces Storage';
}
/**
* @return string
*/
public function getDescription(): string
{
return 'Digitalocean Spaces Storage';
}
}