1 | <?php |
||
22 | class AmazonMetadataBuilder implements MetadataBuilderInterface |
||
23 | { |
||
24 | public const PRIVATE_ACCESS = 'private'; |
||
25 | public const PUBLIC_READ = 'public-read'; |
||
26 | public const PUBLIC_READ_WRITE = 'public-read-write'; |
||
27 | public const AUTHENTICATED_READ = 'authenticated-read'; |
||
28 | public const BUCKET_OWNER_READ = 'bucket-owner-read'; |
||
29 | public const BUCKET_OWNER_FULL_CONTROL = 'bucket-owner-full-control'; |
||
30 | |||
31 | public const STORAGE_STANDARD = 'STANDARD'; |
||
32 | public const STORAGE_REDUCED = 'REDUCED_REDUNDANCY'; |
||
33 | public const STORAGE_GLACIER = 'GLACIER'; |
||
34 | |||
35 | /** |
||
36 | * @var array |
||
37 | */ |
||
38 | protected $settings; |
||
39 | |||
40 | /** |
||
41 | * @var string[] |
||
42 | */ |
||
43 | protected $acl = [ |
||
44 | 'private' => self::PRIVATE_ACCESS, |
||
45 | 'public' => self::PUBLIC_READ, |
||
46 | 'open' => self::PUBLIC_READ_WRITE, |
||
47 | 'auth_read' => self::AUTHENTICATED_READ, |
||
48 | 'owner_read' => self::BUCKET_OWNER_READ, |
||
49 | 'owner_full_control' => self::BUCKET_OWNER_FULL_CONTROL, |
||
50 | ]; |
||
51 | |||
52 | public function __construct(array $settings) |
||
56 | |||
57 | public function get(MediaInterface $media, $filename) |
||
64 | |||
65 | /** |
||
66 | * Get data passed from the config. |
||
67 | * |
||
68 | * @return array |
||
69 | */ |
||
70 | protected function getDefaultMetadata() |
||
106 | |||
107 | /** |
||
108 | * Gets the correct content-type. |
||
109 | * |
||
110 | * @param string $filename |
||
111 | * |
||
112 | * @return array |
||
113 | */ |
||
114 | protected function getContentType($filename) |
||
121 | } |
||
122 |