ConsoleProgressBar
in package
implements
ProgressBarInterface
FinalYes
Table of Contents
Interfaces
- ProgressBarInterface
- Progress bar base implementation.
Constants
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
intgetProgressBarChar()
public
getProgressBarChar() : string
Return values
stringgetProgressBarFormat()
public
getProgressBarFormat() : AbstractProgressBarFormat
Return values
AbstractProgressBarFormatgetProgressBarWidth()
public
getProgressBarWidth() : int
Return values
intrender()
public
render() : string
Tags
Return values
stringsetPercentCompleted()
Set current progress percent.
public
setPercentCompleted(int $percent) : void
Parameters
- $percent : int