SDK for PHP V3

AbstractDownloadHandler extends AbstractTransferListener
in package

AbstractYes

Table of Contents

Constants

PROGRESS_SNAPSHOT_KEY  = 'progress_snapshot'
REASON_KEY  = 'reason'
REQUEST_ARGS_KEY  = 'request_args'

Methods

bytesTransferred()  : bool
getHandlerResult()  : mixed
Returns the handler result.
transferComplete()  : void
transferFail()  : void
transferInitiated()  : void

Constants

PROGRESS_SNAPSHOT_KEY

public mixed PROGRESS_SNAPSHOT_KEY = 'progress_snapshot'

REASON_KEY

public mixed REASON_KEY = 'reason'

REQUEST_ARGS_KEY

public mixed REQUEST_ARGS_KEY = 'request_args'

Methods

bytesTransferred()

public bytesTransferred(array<string|int, mixed> $context) : bool
Parameters
$context : array<string|int, mixed>
  • request_args: (array) The request arguments that will be provided as part of the operation that originated the bytes transferred event.
  • progress_snapshot: (TransferProgressSnapshot) The transfer snapshot holder.
Return values
bool

getHandlerResult()

Returns the handler result.

public abstract getHandlerResult() : mixed
  • For FileDownloadHandler it may return the file destination.
  • For StreamDownloadHandler it may return an instance of StreamInterface containing the content of the object.

transferComplete()

public transferComplete(array<string|int, mixed> $context) : void
Parameters
$context : array<string|int, mixed>
  • request_args: (array) The request arguments that will be provided as part of the operation that originated the bytes transferred event.
  • progress_snapshot: (TransferProgressSnapshot) The transfer snapshot holder.

transferFail()

public transferFail(array<string|int, mixed> $context) : void
Parameters
$context : array<string|int, mixed>
  • request_args: (array) The request arguments that will be provided as part of the operation that originated the bytes transferred event.
  • progress_snapshot: (TransferProgressSnapshot) The transfer snapshot holder.
  • reason: (Throwable) The exception originated by the transfer failure.

transferInitiated()

public transferInitiated(array<string|int, mixed> $context) : void
Parameters
$context : array<string|int, mixed>
  • request_args: (array) The request arguments that will be provided as part of the request initialization.
  • progress_snapshot: (TransferProgressSnapshot) The transfer snapshot holder.
<-- modeled_exceptions -->
On this page