| Conditions | 4 |
| Paths | 8 |
| Total Lines | 23 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 77 | protected function prepareAdapter() |
||
| 78 | { |
||
| 79 | $config = [ |
||
| 80 | 'credentials' => [ |
||
| 81 | 'key' => $this->key, |
||
| 82 | 'secret' => $this->secret |
||
| 83 | ] |
||
| 84 | ]; |
||
| 85 | |||
| 86 | if ($this->region !== null) { |
||
| 87 | $config['region'] = $this->region; |
||
| 88 | } |
||
| 89 | |||
| 90 | if ($this->baseUrl !== null) { |
||
| 91 | $config['base_url'] = $this->baseUrl; |
||
| 92 | } |
||
| 93 | |||
| 94 | $config['version'] = (($this->version !== null) ? $this->version : 'latest'); |
||
| 95 | |||
| 96 | $client = new S3Client($config); |
||
| 97 | |||
| 98 | return new AwsS3Adapter($client, $this->bucket, $this->prefix, $this->options); |
||
| 99 | } |
||
| 100 | } |
||
| 101 |