Documentation

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

$client  : S3Client
$meta  : Model
$params  : array<string|int, mixed>
$target  : EntityBody

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

$params

protected array<string|int, mixed> $params

Array of parameters to pass to a GetObject operation

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
throws
RuntimeException

if the target variable points to a file that cannot be opened

__invoke()

Download the remainder of the object from Amazon S3

public __invoke() : Model

Performs a message integrity check if possible

Return values
Model

getBucket()

Get the bucket of the download

public getBucket() : string
Return values
string

getFilename()

Get the file to which the contents are downloaded

public getFilename() : string
Return values
string

getKey()

Get the key of the download

public getKey() : string
Return values
string

        
On this page

Search results