SingleProgressTracker
extends AbstractTransferListener
in package
implements
ProgressTrackerInterface
FinalYes
To track single object transfers.
Table of Contents
Interfaces
Constants
- PROGRESS_SNAPSHOT_KEY = 'progress_snapshot'
- REASON_KEY = 'reason'
- REQUEST_ARGS_KEY = 'request_args'
Methods
- __construct() : mixed
- bytesTransferred() : bool
- getCurrentSnapshot() : TransferProgressSnapshot|null
- getOutput() : mixed
- getProgressBar() : ProgressBarInterface
- isClear() : bool
- isShowProgressOnUpdate() : bool
- showProgress() : void
- To show the progress being tracked.
- 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
__construct()
public
__construct([ProgressBarInterface $progressBar = new ConsoleProgressBar() ][, mixed|false|resource $output = STDOUT ][, bool $clear = true ][, TransferProgressSnapshot|null $currentSnapshot = null ][, bool $showProgressOnUpdate = true ]) : mixed
Parameters
- $progressBar : ProgressBarInterface = new ConsoleProgressBar()
- $output : mixed|false|resource = STDOUT
- $clear : bool = true
- $currentSnapshot : TransferProgressSnapshot|null = null
- $showProgressOnUpdate : bool = true
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.
Tags
Return values
boolgetCurrentSnapshot()
public
getCurrentSnapshot() : TransferProgressSnapshot|null
Return values
TransferProgressSnapshot|nullgetOutput()
public
getOutput() : mixed
getProgressBar()
public
getProgressBar() : ProgressBarInterface
Return values
ProgressBarInterfaceisClear()
public
isClear() : bool
Return values
boolisShowProgressOnUpdate()
public
isShowProgressOnUpdate() : bool
Return values
boolshowProgress()
To show the progress being tracked.
public
showProgress() : void
Tags
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.
Tags
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.
Tags
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.