Documentation

AbstractTransfer
in package

Contains abstract functionality for transfer objects.

Table of Contents

DEFAULT_PART_SIZE  = 1073741824
Default chunk size is 1GB.
MAX_PART_SIZE  = 5368709120
Maximum chunk size is 5GB.
MIN_PART_SIZE  = 1048576
Minimum chunk size is 1MB.
$client  : Client
$defaultOptions  : array<string|int, mixed>
$entityBody  : EntityBody
$options  : array<string|int, mixed>
$partSize  : int
$transferState  : TransferState
The current state of the transfer responsible for, among other things, holding an itinerary of uploaded parts
getOptions()  : array<string|int, mixed>
getPartSize()  : mixed
newInstance()  : static
setClient()  : $this
setEntityBody()  : $this
setOption()  : $this
setOptions()  : $this
setTransferState()  : $this
setup()  : $this
upload()  : Response
Initiates the upload procedure.
validatePartSize()  : mixed
Make sure the part size falls within a valid range
createManifest()  : Response
With large uploads, you must create a manifest file. Although each segment or TransferPart remains individually addressable, the manifest file serves as the unified file (i.e. the 5GB download) which, when retrieved, streams all the segments concatenated.

Constants

DEFAULT_PART_SIZE

Default chunk size is 1GB.

public mixed DEFAULT_PART_SIZE = 1073741824

MAX_PART_SIZE

Maximum chunk size is 5GB.

public mixed MAX_PART_SIZE = 5368709120

MIN_PART_SIZE

Minimum chunk size is 1MB.

public mixed MIN_PART_SIZE = 1048576

Properties

$defaultOptions

protected array<string|int, mixed> $defaultOptions = array('concurrency' => true, 'partSize' => self::DEFAULT_PART_SIZE, 'prefix' => 'segment', 'doPartChecksum' => true)

Defaults that will always override user-defined options

$options

protected array<string|int, mixed> $options

User-defined key/pair options

$transferState

The current state of the transfer responsible for, among other things, holding an itinerary of uploaded parts

protected TransferState $transferState

Methods

getOptions()

public getOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>

newInstance()

public static newInstance() : static
Return values
static

setOption()

public setOption( $option,  $value) : $this
Parameters
$option :

The key being updated

$value :

The option's value

Return values
$this

setOptions()

public setOptions( $options) : $this
Parameters
$options :
Return values
$this

validatePartSize()

Make sure the part size falls within a valid range

protected validatePartSize() : mixed
Return values
mixed

Search results