ResumableDownload
in package
Allows you to resume the download of a partially downloaded object.
Downloads objects from Amazon S3 in using "Range" downloads. This allows a partially downloaded object to be resumed so that only the remaining portion of the object is downloaded.
Table of Contents
Properties
Methods
- __construct() : mixed
- __invoke() : Model
- Download the remainder of the object from Amazon S3
- getBucket() : string
- Get the bucket of the download
- getFilename() : string
- Get the file to which the contents are downloaded
- getKey() : string
- Get the key of the download
- checkIntegrity() : mixed
- Performs an MD5 message integrity check if possible
- getRemaining() : Model
- Send the command to get the remainder of the object
Properties
$client
protected
S3Client
$client
The S3 client to use to download objects and issue HEAD requests
$meta
protected
Model
$meta
Model object returned when the initial HeadObject operation was called
$params
protected
array<string|int, mixed>
$params
Array of parameters to pass to a GetObject operation
$target
protected
EntityBody
$target
Where the object will be downloaded
Methods
__construct()
public
__construct(S3Client $client, string $bucket, string $key, string|resource|EntityBodyInterface $target[, array<string|int, mixed> $params = array() ]) : mixed
Parameters
- $client : S3Client
-
Client to use when executing requests
- $bucket : string
-
Bucket that holds the object
- $key : string
-
Key of the object
- $target : string|resource|EntityBodyInterface
-
Where the object should be downloaded to. Pass a string to save the object to a file, pass a resource returned by fopen() to save the object to a stream resource, or pass a Guzzle EntityBody object to save the contents to an EntityBody.
- $params : array<string|int, mixed> = array()
-
Any additional GetObject or HeadObject parameters to use with each command issued by the client. (e.g. pass "Version" to download a specific version of an object)
Tags
__invoke()
Download the remainder of the object from Amazon S3
public
__invoke() : Model
Performs a message integrity check if possible
Return values
ModelgetBucket()
Get the bucket of the download
public
getBucket() : string
Return values
stringgetFilename()
Get the file to which the contents are downloaded
public
getFilename() : string
Return values
stringgetKey()
Get the key of the download
public
getKey() : string
Return values
stringcheckIntegrity()
Performs an MD5 message integrity check if possible
protected
checkIntegrity() : mixed
Tags
getRemaining()
Send the command to get the remainder of the object
protected
getRemaining() : Model