| 1 |
<?php |
| 2 |
|
| 3 |
namespace Aws\S3\S3Transfer; |
| 4 |
|
| 5 |
use Aws\CommandInterface; |
| 6 |
use Aws\Result; |
| 7 |
use Aws\ResultInterface; |
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
final class PartGetMultipartDownloader extends AbstractMultipartDownloader |
| 13 |
{ |
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
protected function getFetchCommandArgs(): array |
| 18 |
{ |
| 19 |
$nextCommandArgs = $this->downloadRequestArgs; |
| 20 |
$nextCommandArgs['PartNumber'] = $this->currentPartNo; |
| 21 |
|
| 22 |
return $nextCommandArgs; |
| 23 |
} |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 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 |
} |