Total Complexity | 3 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
16 | class S3SignedResolver extends ExpirationAwareResolver |
||
17 | { |
||
18 | public function __construct( |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * @throws \Exception |
||
28 | */ |
||
29 | public function resolve(string $file, mixed $expiration = null): UriInterface |
||
30 | { |
||
31 | $command = $this->createCommand($this->concat($file, $this->prefix)); |
||
32 | |||
33 | $request = $this->client->createPresignedRequest( |
||
34 | $command, |
||
35 | $this->getExpirationDateTime($expiration), |
||
36 | ); |
||
37 | |||
38 | return $request->getUri(); |
||
39 | } |
||
40 | |||
41 | private function createCommand(string $file): CommandInterface |
||
46 | ]); |
||
47 | } |
||
49 |