| Conditions | 2 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | public function buildUrl(string $uri, array $options = []) |
||
| 34 | { |
||
| 35 | $s3Client = $this->fsInfo->getClient(); |
||
|
|
|||
| 36 | |||
| 37 | return (string)$s3Client |
||
| 38 | ->createPresignedRequest( |
||
| 39 | $s3Client->getCommand( |
||
| 40 | 'GetObject', |
||
| 41 | [ |
||
| 42 | 'Bucket' => $this->fsInfo->getOption(AwsS3Info::BUCKET_KEY), |
||
| 43 | 'Key' => $this->normalizeFilePath($uri), |
||
| 44 | ] |
||
| 45 | ), |
||
| 46 | array_key_exists(static::EXPIRES_OPTION, $options) |
||
| 47 | ? $options[static::EXPIRES_OPTION] |
||
| 48 | : static::DEFAULT_URL_EXPIRES |
||
| 49 | ) |
||
| 50 | ->getUri(); |
||
| 51 | } |
||
| 53 |