Debian Codegraph @

lib/3rdParty/composer/aws/aws-sdk-php/src/S3/S3Transfer/PartGetMultipartDownloader.php

raw symbols SCIP
1 <?php
2
3 namespace Aws\S3\S3Transfer;
4
5 use Aws\CommandInterface;
6 use Aws\Result;
7 use Aws\ResultInterface;
8
9 /**
10 * Multipart downloader using the part get approach.
11 */
12 final class PartGetMultipartDownloader extends AbstractMultipartDownloader
13 {
14 /**
15 * @inheritDoc
16 */
17 protected function getFetchCommandArgs(): array
18 {
19 $nextCommandArgs = $this->downloadRequestArgs;
20 $nextCommandArgs['PartNumber'] = $this->currentPartNo;
21
22 return $nextCommandArgs;
23 }
24
25 /**
26 * @inheritDoc
27 *
28 * @param Result $result
29 *
30 * @return void
31 */
32 protected function computeObjectDimensions(ResultInterface $result): void
33 {
34 if (!empty($result['PartsCount'])) {
35 $this->objectPartsCount = $result['PartsCount'];
36 } else {
37 $this->objectPartsCount = 1;
38 }
39
40 $this->objectSizeInBytes = self::computeObjectSizeFromContentRange(
41 $result['ContentRange'] ?? ""
42 );
43 }
44 }