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 | const CONFIG_PARAM_NAMESPACE = 'namespace'; |
||
19 | /** |
||
20 | * @var S3Client |
||
21 | */ |
||
22 | private $api; |
||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | private $bucket; |
||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | private $namespace; |
||
31 | |||
32 | /** |
||
33 | * @param ArrayNodeDefinition $builder |
||
34 | */ |
||
35 | public function configure(ArrayNodeDefinition $builder) |
||
49 | |||
50 | /** |
||
51 | * @param ContainerBuilder $container |
||
52 | * @param array $config |
||
53 | */ |
||
54 | public function load(ContainerBuilder $container, array $config) |
||
85 | |||
86 | /** |
||
87 | * @param string $binaryImage |
||
88 | * @param string $filename |
||
89 | * |
||
90 | * @return string URL to the image |
||
91 | */ |
||
92 | public function upload($binaryImage, $filename) |
||
99 | |||
100 | /** |
||
101 | * @param array $args |
||
102 | * |
||
103 | * @return S3Client |
||
104 | */ |
||
105 | public function createClient($args) |
||
109 | } |
||
110 |