Documentation

ObjectCopier
in package
implements PromisorInterface

Copies objects from one S3 location to another, utilizing a multipart copy when appropriate.

Interfaces, Classes and Traits

PromisorInterface
Interface used with classes that return a promise.

Table of Contents

DEFAULT_MULTIPART_THRESHOLD  = AwsS3MultipartUploader::PART_MAX_SIZE
$acl  : mixed
$client  : mixed
$defaults  : mixed
$destination  : mixed
$options  : mixed
$source  : mixed
__construct()  : mixed
copy()  : Result
Perform the configured copy synchronously. Returns the result of the CompleteMultipartUpload or CopyObject operation.
promise()  : PromiseInterface
Perform the configured copy asynchronously. Returns a promise that is fulfilled with the result of the CompleteMultipartUpload or CopyObject operation or rejected with an exception.
getSourcePath()  : mixed
validateLocation()  : mixed

Constants

DEFAULT_MULTIPART_THRESHOLD

public mixed DEFAULT_MULTIPART_THRESHOLD = AwsS3MultipartUploader::PART_MAX_SIZE

Properties

$defaults

private static mixed $defaults = ['before_lookup' => null, 'before_upload' => null, 'concurrency' => 5, 'mup_threshold' => self::DEFAULT_MULTIPART_THRESHOLD, 'params' => [], 'part_size' => null, 'version_id' => null]

Methods

__construct()

public __construct(S3ClientInterface $client, array<string|int, mixed> $source, array<string|int, mixed> $destination[, string $acl = 'private' ][, array<string|int, mixed> $options = [] ]) : mixed
Parameters
$client : S3ClientInterface

The S3 Client used to execute the copy command(s).

$source : array<string|int, mixed>

The object to copy, specified as an array with a 'Bucket' and 'Key' keys. Provide a 'VersionID' key to copy a specified version of an object.

$destination : array<string|int, mixed>

The bucket and key to which to copy the $source, specified as an array with a 'Bucket' and 'Key' keys.

$acl : string = 'private'

ACL to apply to the copy (default: private).

$options : array<string|int, mixed> = []

Options used to configure the copy process. Options passed in through 'params' are added to the sub commands.

Tags
throws
InvalidArgumentException
Return values
mixed

promise()

Perform the configured copy asynchronously. Returns a promise that is fulfilled with the result of the CompleteMultipartUpload or CopyObject operation or rejected with an exception.

public promise() : PromiseInterface
Return values
PromiseInterface

getSourcePath()

private getSourcePath() : mixed
Return values
mixed

validateLocation()

private validateLocation(array<string|int, mixed> $location) : mixed
Parameters
$location : array<string|int, mixed>
Return values
mixed

Search results