DownloadRequest
extends AbstractTransferRequest
in package
FinalYes
Table of Contents
Properties
- $configKeys : array<string|int, mixed>
Methods
- __construct() : mixed
- fromDownloadRequestAndDownloadHandler() : self
- getConfig() : array<string|int, mixed>
- getDownloadHandler() : AbstractDownloadHandler
- getListeners() : array<string|int, mixed>
- Get current listeners.
- getObjectRequestArgs() : array<string|int, mixed>
- getProgressTracker() : AbstractTransferListener|null
- Get the progress tracker.
- getSingleObjectListeners() : array<string|int, mixed>
- Get listeners that should receive single-object events.
- getSource() : array<string|int, mixed>|string|null
- normalizeSourceAsArray() : array<string|int, mixed>
- Helper method to normalize the source as an array with: - Bucket - Key
- updateConfigWithDefaults() : void
- validateConfig() : void
- For validating config. By default, it provides an empty implementation.
Properties
$configKeys
public
static array<string|int, mixed>
$configKeys
= ['response_checksum_validation' => 'string', 'multipart_download_type' => 'string', 'track_progress' => 'bool', 'concurrency' => 'int', 'resume_enabled' => 'bool', 'resume_file_path' => 'string', 'target_part_size_bytes' => 'int']
Methods
__construct()
public
__construct(string|array<string|int, mixed>|null $source[, array<string|int, mixed> $downloadRequestArgs = [] ][, array<string|int, mixed> $config = [] ][, AbstractDownloadHandler|null $downloadHandler = null ][, array<string|int, AbstractTransferListener>|null $listeners = [] ][, AbstractTransferListener|null $progressTracker = null ]) : mixed
Parameters
- $source : string|array<string|int, mixed>|null
-
The object to be downloaded from S3. It can be either a string with a S3 URI or an array with a Bucket and Key properties set.
- $downloadRequestArgs : array<string|int, mixed> = []
- $config : array<string|int, mixed> = []
-
The configuration to be used for this operation:
- multipart_download_type: (string, optional) Overrides the resolved value from the transfer manager config.
- response_checksum_validation: (string, optional) Overrides the resolved value from transfer manager config for whether checksum validation should be done. This option will be considered just if ChecksumMode is not present in the request args.
- track_progress: (bool) Overrides the config option set in the transfer manager instantiation to decide whether transfer progress should be tracked.
- target_part_size_bytes: (int) The part size in bytes to be used
in a range multipart download. If this parameter is not provided
then it fallbacks to the transfer manager
target_part_size_bytesconfig value. - resume_enabled: (bool): To enable resuming a multipart download when a failure occurs.
- resume_file_path (string, optional): To override the default resume file
location to be generated. If specified the file name must end in
.resumeotherwise it will be added automatically. The destination and temporary download files must be contained by this file's directory.
- $downloadHandler : AbstractDownloadHandler|null = null
- $listeners : array<string|int, AbstractTransferListener>|null = []
- $progressTracker : AbstractTransferListener|null = null
fromDownloadRequestAndDownloadHandler()
public
static fromDownloadRequestAndDownloadHandler(DownloadRequest $downloadRequest, FileDownloadHandler $downloadHandler) : self
Parameters
- $downloadRequest : DownloadRequest
- $downloadHandler : FileDownloadHandler
Return values
selfgetConfig()
public
getConfig() : array<string|int, mixed>
Return values
array<string|int, mixed>getDownloadHandler()
public
getDownloadHandler() : AbstractDownloadHandler
Return values
AbstractDownloadHandlergetListeners()
Get current listeners.
public
getListeners() : array<string|int, mixed>
Return values
array<string|int, mixed>getObjectRequestArgs()
public
getObjectRequestArgs() : array<string|int, mixed>
Return values
array<string|int, mixed>getProgressTracker()
Get the progress tracker.
public
getProgressTracker() : AbstractTransferListener|null
Return values
AbstractTransferListener|nullgetSingleObjectListeners()
Get listeners that should receive single-object events.
public
getSingleObjectListeners() : array<string|int, mixed>
Return values
array<string|int, mixed>getSource()
public
getSource() : array<string|int, mixed>|string|null
Return values
array<string|int, mixed>|string|nullnormalizeSourceAsArray()
Helper method to normalize the source as an array with: - Bucket - Key
public
normalizeSourceAsArray() : array<string|int, mixed>
Return values
array<string|int, mixed>updateConfigWithDefaults()
public
updateConfigWithDefaults(array<string|int, mixed> $defaultConfig) : void
Parameters
- $defaultConfig : array<string|int, mixed>
validateConfig()
For validating config. By default, it provides an empty implementation.
public
validateConfig() : void