Zend\ProgressBar\Adapter\JsPull offers a simple method for updating a progressbar in a browser.

package Default
inherited_from \Zend\ProgressBar\Adapter\AbstractAdapter

 Methods

Create a new adapter

__construct(array|\Traversable $options = null
Inherited

$options may be either be an array or a Zend\Config object which specifies adapter related options.

Parameters

$options

array\Traversable

Defined by Zend\ProgressBar\Adapter\AbstractAdapter

finish() : void
inherited_from \Zend\ProgressBar\Adapter\AbstractAdapter::finish()

Called when the progress is explicitly finished

finish() : void
Inherited

Defined by Zend\ProgressBar\Adapter\AbstractAdapter

notify(float $current, float $max, float $percent, integer $timeTaken, integer $timeRemaining, string $text) : void
inherited_from \Zend\ProgressBar\Adapter\AbstractAdapter::notify()

Parameters

$current

float

Current progress value

$max

float

Max progress value

$percent

float

Current percent value

$timeTaken

integer

Taken time in seconds

$timeRemaining

integer

Remaining time in seconds

$text

string

Status text

Notify the adapter about an update

notify(float $current, float $max, float $percent, integer $timeTaken, integer $timeRemaining, string $text) : void
Inherited

Parameters

$current

float

Current progress value

$max

float

Max progress value

$percent

float

Current percent value

$timeTaken

integer

Taken time in seconds

$timeRemaining

integer

Remaining time in seconds

$text

string

Status text

Set whether to exit after json data send or not

setExitAfterSend(boolean $exitAfterSend) : \Zend\ProgressBar\Adapter\JsPull

Parameters

$exitAfterSend

boolean

Returns

\Zend\ProgressBar\Adapter\JsPull

Set options via an array

setOptions(array $options) : \Zend\ProgressBar\Adapter\AbstractAdapter
Inherited

Parameters

$options

array

Returns

\Zend\ProgressBar\Adapter\AbstractAdapter

Outputs given data the user agent.

_outputData(string $data) : void

This split-off is required for unit-testing.

Parameters

$data

string

 Properties

 

Whether to exit after json data send or not

$exitAfterSend : boolean

Default

true
 

Option keys to skip when calling setOptions()

$skipOptions : array

Default

array('options', 'config')