SDK for PHP V3

ConsoleProgressBar
in package
implements ProgressBarInterface

FinalYes

Table of Contents

Interfaces

ProgressBarInterface
Progress bar base implementation.

Constants

DEFAULT_PROGRESS_BAR_CHAR  = '#'
DEFAULT_PROGRESS_BAR_WIDTH  = 50
MAX_PROGRESS_BAR_WIDTH  = 50

Methods

__construct()  : mixed
getPercentCompleted()  : int
getProgressBarChar()  : string
getProgressBarFormat()  : AbstractProgressBarFormat
getProgressBarWidth()  : int
render()  : string
setPercentCompleted()  : void
Set current progress percent.

Constants

DEFAULT_PROGRESS_BAR_CHAR

public mixed DEFAULT_PROGRESS_BAR_CHAR = '#'

DEFAULT_PROGRESS_BAR_WIDTH

public mixed DEFAULT_PROGRESS_BAR_WIDTH = 50

MAX_PROGRESS_BAR_WIDTH

public mixed MAX_PROGRESS_BAR_WIDTH = 50

Methods

__construct()

public __construct([string $progressBarChar = self::DEFAULT_PROGRESS_BAR_CHAR ][, int $progressBarWidth = self::DEFAULT_PROGRESS_BAR_WIDTH ][, int $percentCompleted = 0 ][, AbstractProgressBarFormat $progressBarFormat = new ColoredTransferProgressBarFormat() ]) : mixed
Parameters
$progressBarChar : string = self::DEFAULT_PROGRESS_BAR_CHAR
$progressBarWidth : int = self::DEFAULT_PROGRESS_BAR_WIDTH
$percentCompleted : int = 0
$progressBarFormat : AbstractProgressBarFormat = new ColoredTransferProgressBarFormat()

getPercentCompleted()

public getPercentCompleted() : int
Return values
int

getProgressBarChar()

public getProgressBarChar() : string
Return values
string

getProgressBarWidth()

public getProgressBarWidth() : int
Return values
int

render()

public render() : string
Tags
inheritDoc
Return values
string

setPercentCompleted()

Set current progress percent.

public setPercentCompleted(int $percent) : void
Parameters
$percent : int
<-- modeled_exceptions -->
On this page