NOTE: For Version 3 of the AWS SDK for PHP, please see the V3 User Guide and V3 API Reference.

# Class AbstractTransferState

State of a multipart upload

  Aws\Common\Model\MultipartUpload\AbstractTransferState implements Aws\Common\Model\MultipartUpload\TransferStateInterface

### Direct known subclasses

`Aws\Glacier\Model\MultipartUpload\TransferState`, `Aws\S3\Model\MultipartUpload\TransferState`

Abstract
Namespace: Aws\Common\Model\MultipartUpload
Located at Aws/Common/Model/MultipartUpload/AbstractTransferState.php

## Methods summary

- `public` `__construct ( Aws\Common\Model\MultipartUpload\UploadIdInterface $uploadId )`

  Construct a new transfer state object

- `public` `getUploadId ( )`

  Get the params used to identify an upload part

- `public` `getFromId ( string $key )`

  Get a data value from the transfer state's uploadId

- `public` `getPart ( int $partNumber )`

  Get the part information of a specific part

- `public` `addPart ( Aws\Common\Model\MultipartUpload\UploadPartInterface $part )`

  Add a part to the transfer state

- `public` `hasPart ( int $partNumber )`

  Check if a specific part has been uploaded

- `public` `getPartNumbers ( )`

  Get a list of all of the uploaded part numbers

- `public` `setAborted ( bool $aborted )`

  Set whether or not the transfer has been aborted

- `public` `isAborted ( )`

  Check if the transfer has been marked as aborted

- `public` `count ( )`
- `public` `getIterator ( )`
- `public` `serialize ( )`
- `public` `unserialize ( mixed $serialized )`

## Methods detail

# `public`
`__construct( `Aws\Common\Model\MultipartUpload\UploadIdInterface` $uploadId )`

Construct a new transfer state object

#### Parameters

$uploadId
  ``Aws\Common\Model\MultipartUpload\UploadIdInterface``
  $uploadId Upload identifier object

# `public `Aws\Common\Model\MultipartUpload\UploadIdInterface``
`getUploadId( )`

Get the params used to identify an upload part

#### Returns

``Aws\Common\Model\MultipartUpload\UploadIdInterface``

#### Implementation of

`Aws\Common\Model\MultipartUpload\TransferStateInterface::getUploadId()`
# `public string|null`
`getFromId( string $key )`

Get a data value from the transfer state's uploadId

#### Parameters

$key
  `string`
  $key Key to retrieve (e.g. Bucket, Key, UploadId, etc)

#### Returns

`string|null`
# `public `Aws\Common\Model\MultipartUpload\UploadPartInterface``
`getPart( integer $partNumber )`

Get the part information of a specific part

#### Parameters

$partNumber
  `integer`
  $partNumber Part to retrieve

#### Returns

``Aws\Common\Model\MultipartUpload\UploadPartInterface``

#### Implementation of

`Aws\Common\Model\MultipartUpload\TransferStateInterface::getPart()`
# `public `Aws\Common\Model\MultipartUpload\AbstractTransferState``
`addPart( `Aws\Common\Model\MultipartUpload\UploadPartInterface` $part )`

Add a part to the transfer state

#### Parameters

$part
  ``Aws\Common\Model\MultipartUpload\UploadPartInterface``
  $part The part to add

#### Returns

``Aws\Common\Model\MultipartUpload\AbstractTransferState``

#### Implementation of

`Aws\Common\Model\MultipartUpload\TransferStateInterface::addPart()`
# `public boolean`
`hasPart( integer $partNumber )`

Check if a specific part has been uploaded

#### Parameters

$partNumber
  `integer`
  $partNumber Part to check

#### Returns

`boolean`

#### Implementation of

`Aws\Common\Model\MultipartUpload\TransferStateInterface::hasPart()`
# `public array`
`getPartNumbers( )`

Get a list of all of the uploaded part numbers

#### Returns

`array`

#### Implementation of

`Aws\Common\Model\MultipartUpload\TransferStateInterface::getPartNumbers()`
# `public `Aws\Common\Model\MultipartUpload\AbstractTransferState``
`setAborted( boolean $aborted )`

Set whether or not the transfer has been aborted

#### Parameters

$aborted
  `boolean`
  $aborted Set to true to mark the transfer as aborted

#### Returns

``Aws\Common\Model\MultipartUpload\AbstractTransferState``

#### Implementation of

`Aws\Common\Model\MultipartUpload\TransferStateInterface::setAborted()`
# `public boolean`
`isAborted( )`

Check if the transfer has been marked as aborted

#### Returns

`boolean`

#### Implementation of

`Aws\Common\Model\MultipartUpload\TransferStateInterface::isAborted()`
# `public`
`count( )`

#### Implementation of

`Countable::count()`
# `public`
`getIterator( )`

#### Implementation of

`IteratorAggregate::getIterator()`
# `public`
`serialize( )`

#### Implementation of

`Serializable::serialize()`
# `public`
`unserialize( mixed $serialized )`

#### Implementation of

`Serializable::unserialize()`

### Methods inherited from Aws\Common\Model\MultipartUpload\TransferStateInterface

`fromUploadId()`

### Magic methods summary

## Properties summary

`protected `Aws\Common\Model\MultipartUpload\UploadIdInterface`` | $uploadId | # Object holding params used to identity the upload part
`protected array` | $parts | # Array of parts where the part number is the index
`protected boolean` | $aborted | # Whether or not the transfer was aborted