ProgressBar/Adapter/Console.php
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_ProgressBar
- Version
- $Id: Console.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_ProgressBar_Adapter_Console
Package: Zend\ProgressBarZend_ProgressBar_Adapter_Console offers a text-based progressbar for console
applications
- Parent(s)
- \Zend_ProgressBar_Adapter
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Uses
- \global\Zend_ProgressBar_Adapter_Interface
Constants
Properties



string $_barIndicatorChar = ''Indicator character(s) within the bar
Default value''Details- Type
- string



string $_barLeftChar = '#'Left character(s) within the bar
Default value'#'Details- Type
- string



string $_barRightChar = '-'Right character(s) within the bar
Default value'-'Details- Type
- string



string $_finishAction = self::FINISH_ACTION_EOLWhich action to do at finish call
Default valueself::FINISH_ACTION_EOLDetails- Type
- string



boolean $_outputStarted = falseWether the output started yet or not
Default valuefalseDetails- Type
- boolean



string $_textWidth = 20Width of the text element
Default value20Details- Type
- string
Methods



__construct(null | array | \Zend_Config $options = null) : voidDefined by Zend_ProgressBar_Adapter
$options may be either be an array or a Zend_Config object which
specifies adapter related options.
Parameters


_outputData(string $data) : voidOutputs given data to STDOUT.
This split-off is required for unit-testing.
Parameters| Name | Type | Description |
|---|
| $data | string | |
|---|



notify(float $current, float $max, float $percent, integer $timeTaken, integer $timeRemaining, string $text) : voidDefined by Zend_ProgressBar_Adapter_Interface
Parameters| Name | Type | Description |
|---|
| $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 |
|---|



setCharset(string $charset) : voidSet the charset of the text element
Parameters| Name | Type | Description |
|---|
| $charset | string | |
|---|



setElements(array $elements) : \Zend_ProgressBar_Adapter_ConsoleSet the elements to display with the progressbar
Parameters| Name | Type | Description |
|---|
| $elements | array | |
|---|
ReturnsThrows