1 | <?php |
||
9 | class AwsS3 implements ImageDriverInterface |
||
10 | { |
||
11 | const CONFIG_PARAM_BUCKET = 'bucket'; |
||
12 | const CONFIG_PARAM_VERSION = 'version'; |
||
13 | const CONFIG_PARAM_REGION = 'region'; |
||
14 | const CONFIG_PARAM_CREDENTIALS_KEY = 'credentials_key'; |
||
15 | const CONFIG_PARAM_CREDENTIALS_SECRET = 'credentials_secret'; |
||
16 | const CONFIG_PARAM_CREDENTIALS_TOKEN = 'credentials_token'; |
||
17 | const CONFIG_PARAM_CLIENT_FACTORY = 'client_factory'; |
||
18 | /** |
||
19 | * @var S3Client |
||
20 | */ |
||
21 | private $api; |
||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | private $bucket; |
||
26 | |||
27 | /** |
||
28 | * @param ArrayNodeDefinition $builder |
||
29 | */ |
||
30 | public function configure(ArrayNodeDefinition $builder) |
||
43 | |||
44 | /** |
||
45 | * @param ContainerBuilder $container |
||
46 | * @param array $config |
||
47 | */ |
||
48 | public function load(ContainerBuilder $container, array $config) |
||
75 | |||
76 | /** |
||
77 | * @param string $binaryImage |
||
78 | * @param string $filename |
||
79 | * |
||
80 | * @return string URL to the image |
||
81 | */ |
||
82 | public function upload($binaryImage, $filename) |
||
88 | |||
89 | /** |
||
90 | * @param array $args |
||
91 | * |
||
92 | * @return S3Client |
||
93 | */ |
||
94 | public function createClient($args) |
||
98 | } |
||
99 |