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.
Zend_ProgressBar_Adapter_Console offers a text-based progressbar for console applications
ELEMENT_PERCENT = 'ELEMENT_PERCENT'
Percentage value of the progress
ELEMENT_BAR = 'ELEMENT_BAR'
Visual value of the progress
ELEMENT_ETA = 'ELEMENT_ETA'
ETA of the progress
ELEMENT_TEXT = 'ELEMENT_TEXT'
Text part of the progress
FINISH_ACTION_EOL = 'FINISH_ACTION_EOL'
Finish action: End of Line
FINISH_ACTION_CLEAR_LINE = 'FINISH_ACTION_CLEAR_LINE'
Finish action: Clear Line
FINISH_ACTION_NONE = 'FINISH_ACTION_NONE'
Finish action: None
string $_barIndicatorChar = ''
Indicator character(s) within the bar
string $_barLeftChar = '#'
Left character(s) within the bar
string $_barRightChar = '-'
Right character(s) within the bar
integer $_barWidth = ''
Width of the bar element
string $_charset = 'utf-8'
Charset of text element
array $_elements = 'array'
Elements to display
string $_finishAction = 'self'
Which action to do at finish call
boolean $_outputStarted = 'false'
Wether the output started yet or not
resource $_outputStream = 'null'
Output-stream, when STDOUT is not defined (e.g. in CGI) or set manually
string $_textWidth = '20'
Width of the text element
integer $_width = 'null'
Width of the progressbar
__construct(
null|array|Zend_Config $options
=
null
)
:
Defined by Zend_ProgressBar_Adapter
__destruct(
)
:
Close local stdout, when open
_calculateBarWidth(
)
:
void
Calculate the bar width when other elements changed
_outputData(
string $data
)
:
void
Outputs given data to STDOUT.
This split-off is required for unit-testing.
finish(
)
:
void
Defined by Zend_ProgressBar_Adapter_Interface
getOutputStream(
)
:
resource
Get the current output stream
notify(
float $current, float $max, float $percent, integer $timeTaken, integer $timeRemaining, string $text
)
:
void
Defined by Zend_ProgressBar_Adapter_Interface
setBarIndicatorChar(
string $char
)
:
Zend_ProgressBar_Adapter_Console
Set the indicator character for the bar
setBarLeftChar(
string $char
)
:
Zend_ProgressBar_Adapter_Console
Set the left-hand character for the bar
setBarRightChar(
string $char
)
:
Zend_ProgressBar_Adapter_Console
Set the right-hand character for the bar
setCharset(
string $charset
)
:
Set the charset of the text element
setElements(
array $elements
)
:
Zend_ProgressBar_Adapter_Console
Set the elements to display with the progressbar
setFinishAction(
string $action
)
:
Zend_ProgressBar_Adapter_Console
Set the finish action
setOutputStream(
string $resource
)
:
Zend_ProgressBar_Adapter_Console
Set a different output-stream
setTextWidth(
integer $width
)
:
Zend_ProgressBar_Adapter_Console
Set the width of the text element
setWidth(
integer $width
=
null
)
:
Zend_ProgressBar_Adapter_Console
Set the width of the progressbar