SDK for PHP V3

UploadRequest extends AbstractTransferRequest
in package

FinalYes

Table of Contents

Properties

$configKeys  : array<string|int, mixed>

Methods

__construct()  : mixed
getConfig()  : array<string|int, mixed>
getListeners()  : array<string|int, mixed>
Get current listeners.
getProgressTracker()  : AbstractTransferListener|null
Get the progress tracker.
getS3Client()  : S3ClientInterface|null
getSource()  : StreamInterface|string
Get the source.
getUploadRequestArgs()  : array<string|int, mixed>
Get the put object request.
updateConfigWithDefaults()  : void
validateConfig()  : void
For validating config. By default, it provides an empty implementation.
validateRequiredParameters()  : void
Helper method for validating required parameters.
validateSource()  : void
Helper method for validating the given source.

Properties

$configKeys

public static array<string|int, mixed> $configKeys = ['multipart_upload_threshold_bytes' => 'int', 'target_part_size_bytes' => 'int', 'track_progress' => 'bool', 'concurrency' => 'int', 'request_checksum_calculation' => 'string']

Methods

__construct()

public __construct(string|StreamInterface $source, array<string|int, mixed> $uploadRequestArgs[, array<string|int, mixed> $config = [] ][, array<string|int, AbstractTransferListener>|null $listeners = [] ][, AbstractTransferListener|null $progressTracker = null ][, S3ClientInterface|null $s3Client = null ]) : mixed
Parameters
$source : string|StreamInterface
$uploadRequestArgs : array<string|int, mixed>

The putObject request arguments. Required parameters would be:

  • Bucket: (string, required)
  • Key: (string, required)
$config : array<string|int, mixed> = []

The config options for this upload operation.

  • multipart_upload_threshold_bytes: (int, optional) To override the default threshold for when to use multipart upload.
  • target_part_size_bytes: (int, optional) To override the default target part size in bytes.
  • track_progress: (bool, optional) To override the default option for enabling progress tracking. If this option is resolved as true and a progressTracker parameter is not provided then, a default implementation will be resolved. This option is intended to make the operation to use a default progress tracker implementation when $progressTracker is null.
  • concurrency: (int, optional) To override default value for concurrency.
  • request_checksum_calculation: (string, optional, defaulted to when_supported)
$listeners : array<string|int, AbstractTransferListener>|null = []
$progressTracker : AbstractTransferListener|null = null
$s3Client : S3ClientInterface|null = null

getConfig()

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

getListeners()

Get current listeners.

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

getUploadRequestArgs()

Get the put object request.

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

updateConfigWithDefaults()

public updateConfigWithDefaults(array<string|int, mixed> $defaultConfig) : void
Parameters
$defaultConfig : array<string|int, mixed>

validateConfig()

For validating config. By default, it provides an empty implementation.

public validateConfig() : void

validateRequiredParameters()

Helper method for validating required parameters.

public validateRequiredParameters([string|null $customMessage = null ]) : void
Parameters
$customMessage : string|null = null

validateSource()

Helper method for validating the given source.

public validateSource() : void
<-- modeled_exceptions -->
On this page