TransferState
extends AbstractTransferState
in package
State of a multipart upload
Table of Contents
Properties
- $aborted : bool
- $parts : array<string|int, mixed>
- $uploadId : UploadIdInterface
Methods
- __construct() : mixed
- Construct a new transfer state object
- addPart() : self
- Add a part to the transfer state
- count() : mixed
- {@inheritdoc}
- fromUploadId() : self
- Create the transfer state from the results of list parts request
- getFromId() : string|null
- Get a data value from the transfer state's uploadId
- getIterator() : mixed
- {@inheritdoc}
- getPart() : UploadPartInterface
- Get the part information of a specific part
- getPartNumbers() : array<string|int, mixed>
- Get a list of all of the uploaded part numbers
- getUploadId() : UploadIdInterface
- Get the params used to identify an upload part
- hasPart() : bool
- Check if a specific part has been uploaded
- isAborted() : bool
- Check if the transfer has been marked as aborted
- serialize() : mixed
- {@inheritdoc}
- setAborted() : self
- Set whether or not the transfer has been aborted
- unserialize() : mixed
- {@inheritdoc}
Properties
$aborted
protected
bool
$aborted
= false
Whether or not the transfer was aborted
$parts
protected
array<string|int, mixed>
$parts
= array()
Array of parts where the part number is the index
$uploadId
protected
UploadIdInterface
$uploadId
Object holding params used to identity the upload part
Methods
__construct()
Construct a new transfer state object
public
__construct(UploadIdInterface $uploadId) : mixed
Parameters
- $uploadId : UploadIdInterface
-
Upload identifier object
addPart()
Add a part to the transfer state
public
addPart(UploadPartInterface $part) : self
Parameters
- $part : UploadPartInterface
-
The part to add
Return values
selfcount()
{@inheritdoc}
public
count() : mixed
fromUploadId()
Create the transfer state from the results of list parts request
public
static fromUploadId(AwsClientInterface $client, UploadIdInterface $uploadId) : self
Parameters
- $client : AwsClientInterface
-
Client used to send the request
- $uploadId : UploadIdInterface
-
Params needed to identify the upload and form the request
Return values
selfgetFromId()
Get a data value from the transfer state's uploadId
public
getFromId(string $key) : string|null
Parameters
- $key : string
-
Key to retrieve (e.g. Bucket, Key, UploadId, etc)
Return values
string|nullgetIterator()
{@inheritdoc}
public
getIterator() : mixed
getPart()
Get the part information of a specific part
public
getPart(mixed $partNumber) : UploadPartInterface
Parameters
- $partNumber : mixed
-
Part to retrieve
Return values
UploadPartInterfacegetPartNumbers()
Get a list of all of the uploaded part numbers
public
getPartNumbers() : array<string|int, mixed>
Return values
array<string|int, mixed>getUploadId()
Get the params used to identify an upload part
public
getUploadId() : UploadIdInterface
Return values
UploadIdInterfacehasPart()
Check if a specific part has been uploaded
public
hasPart(mixed $partNumber) : bool
Parameters
- $partNumber : mixed
-
Part to check
Return values
boolisAborted()
Check if the transfer has been marked as aborted
public
isAborted() : bool
Return values
boolserialize()
{@inheritdoc}
public
serialize() : mixed
setAborted()
Set whether or not the transfer has been aborted
public
setAborted(mixed $aborted) : self
Parameters
- $aborted : mixed
-
Set to true to mark the transfer as aborted
Return values
selfunserialize()
{@inheritdoc}
public
unserialize(mixed $serialized) : mixed
Parameters
- $serialized : mixed