SDK for PHP V3

ColoredTransferProgressBarFormat extends AbstractProgressBarFormat
in package

FinalYes

Defines a progress bar format.

Table of Contents

Constants

BLACK_COLOR_CODE  = '[30m'
BLUE_COLOR_CODE  = '[34m'
FORMAT_PARAMETERS  = ['progress_bar', 'percent', 'transferred', 'to_be_transferred', 'unit', 'color_code', 'message', 'object_name']
FORMAT_TEMPLATE  = "|object_name|:\n" . "\x1b|color_code|[|progress_bar|] |percent|% " . "|transferred|/|to_be_transferred| |unit| |message|\x1b[0m"
GREEN_COLOR_CODE  = '[32m'
RED_COLOR_CODE  = '[31m'

Methods

__construct()  : mixed
format()  : string
getArgs()  : array<string|int, mixed>
getFormatParameters()  : array<string|int, mixed>
getFormatTemplate()  : string
setArg()  : void
setArgs()  : void
To set multiple arguments at once.

Constants

BLACK_COLOR_CODE

public mixed BLACK_COLOR_CODE = '[30m'

BLUE_COLOR_CODE

public mixed BLUE_COLOR_CODE = '[34m'

FORMAT_PARAMETERS

public mixed FORMAT_PARAMETERS = ['progress_bar', 'percent', 'transferred', 'to_be_transferred', 'unit', 'color_code', 'message', 'object_name']

FORMAT_TEMPLATE

public mixed FORMAT_TEMPLATE = "|object_name|:\n" . "\x1b|color_code|[|progress_bar|] |percent|% " . "|transferred|/|to_be_transferred| |unit| |message|\x1b[0m"

GREEN_COLOR_CODE

public mixed GREEN_COLOR_CODE = '[32m'

RED_COLOR_CODE

public mixed RED_COLOR_CODE = '[31m'

Methods

__construct()

public __construct([array<string|int, mixed> $args = [] ]) : mixed
Parameters
$args : array<string|int, mixed> = []

format()

public format() : string
Return values
string

getArgs()

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

getFormatParameters()

public getFormatParameters() : array<string|int, mixed>
Tags
inheritDoc
Return values
array<string|int, mixed>

getFormatTemplate()

public getFormatTemplate() : string
Tags
inheritDoc
Return values
string

setArg()

public setArg(string $key, mixed $value) : void
Parameters
$key : string
$value : mixed

setArgs()

To set multiple arguments at once.

public setArgs(array<string|int, mixed> $args) : void

It does not override all the values, instead it adds the arguments individually and if a value already exists then that value will be overridden.

Parameters
$args : array<string|int, mixed>
<-- modeled_exceptions -->
On this page