Zend\ProgressBar offers an interface for multiple environments.

package Default

 Methods

Create a new progressbar backend.

__construct(\Zend\ProgressBar\Adapter\AbstractAdapter $adapter, float|integer $min = 0, float|integer $max = 100, string|null $persistenceNamespace = null

Parameters

$adapter

\Zend\ProgressBar\Adapter\AbstractAdapter

$min

floatinteger

$max

floatinteger

$persistenceNamespace

stringnull

Exceptions

\Zend\ProgressBar\Exception\OutOfRangeException When $min is greater than $max

Call the adapters finish() behaviour

finish() : void

Get the current adapter

getAdapter() : \Zend\ProgressBar\Adapter\AbstractAdapter

Returns

\Zend\ProgressBar\Adapter\AbstractAdapter

Update the progressbar to the next value

next(integer $diff = 1, string $text = null) : void

Parameters

$diff

integer

$text

string

Update the progressbar

update(float $value = null, string $text = null) : void

Parameters

$value

float

$text

string

 Properties

 

Adapter for the output

$adapter : \Zend\ProgressBar\Adapter\AbstractAdapter

Default

 

Current value

$current : float

Default

 

Max value

$max : float

Default

 

Min value

$min : float

Default

 

Namespace for keeping the progressbar persistent

$persistenceNamespace : string

Default

null
 

Start time of the progressbar, required for ETA

$startTime : integer

Default

 

Current status text

$statusText : string

Default

null