Zend\ProgressBar\Adapter\JsPush 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 the finish method name

setFinishMethodName(string $methodName) : \Zend\ProgressBar\Adapter\JsPush

Parameters

$methodName

string

Returns

\Zend\ProgressBar\Adapter\JsPush

Set options via an array

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

Parameters

$options

array

Returns

\Zend\ProgressBar\Adapter\AbstractAdapter

Set the update method name

setUpdateMethodName(string $methodName) : \Zend\ProgressBar\Adapter\JsPush

Parameters

$methodName

string

Returns

\Zend\ProgressBar\Adapter\JsPush

Outputs given data the user agent.

_outputData(string $data) : void

This split-off is required for unit-testing.

Parameters

$data

string

 Properties

 

Name of the JavaScript method to call on finish

$finishMethodName : string

Default

 

Option keys to skip when calling setOptions()

$skipOptions : array

Default

array('options', 'config')
 

Name of the JavaScript method to call on update

$updateMethodName : string

Default

'Zend\ProgressBar\ProgressBar\Update'