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_EOL
Which action to do at finish call
Default valueself::FINISH_ACTION_EOL
Details- Type
- string



boolean $_outputStarted = false
Wether the output started yet or not
Default valuefalse
Details- Type
- boolean



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



__construct(null | array | \Zend_Config $options = null) : void
Defined 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) : void
Outputs given data to STDOUT.
This split-off is required for unit-testing.
ParametersName | Type | Description |
---|
$data | string | |
---|



notify(float $current, float $max, float $percent, integer $timeTaken, integer $timeRemaining, string $text) : void
Defined by Zend_ProgressBar_Adapter_Interface
ParametersName | 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) : void
Set the charset of the text element
ParametersName | Type | Description |
---|
$charset | string | |
---|



setElements(array $elements) : \Zend_ProgressBar_Adapter_Console
Set the elements to display with the progressbar
ParametersName | Type | Description |
---|
$elements | array | |
---|
ReturnsThrows