2014-03-01 04:11:27 +00:00
< ? php
/*
* This file is part of the Symfony package .
*
* ( c ) Fabien Potencier < fabien @ symfony . com >
*
* For the full copyright and license information , please view the LICENSE
* file that was distributed with this source code .
*/
namespace Symfony\Component\Console\Helper ;
use Symfony\Component\Console\Output\OutputInterface ;
/**
* The ProgressBar provides helpers to display progress output .
*
* @ author Fabien Potencier < fabien @ symfony . com >
* @ author Chris Jones < leeked @ gmail . com >
*/
class ProgressBar
{
// options
2014-10-30 20:17:55 +00:00
private $barWidth = 28 ;
2014-07-07 16:54:11 +01:00
private $barChar ;
2014-03-01 04:11:27 +00:00
private $emptyBarChar = '-' ;
private $progressChar = '>' ;
2014-10-30 20:17:55 +00:00
private $format = null ;
private $redrawFreq = 1 ;
2014-03-01 04:11:27 +00:00
/**
* @ var OutputInterface
*/
private $output ;
2014-07-07 16:54:11 +01:00
private $step = 0 ;
2014-03-01 04:11:27 +00:00
private $max ;
private $startTime ;
2014-03-01 07:26:09 +00:00
private $stepWidth ;
2014-07-07 16:54:11 +01:00
private $percent = 0.0 ;
private $lastMessagesLength = 0 ;
2014-03-01 07:54:45 +00:00
private $formatLineCount ;
2014-03-01 08:14:29 +00:00
private $messages ;
2014-09-04 19:07:35 +01:00
private $overwrite = true ;
2014-03-01 04:11:27 +00:00
2014-03-01 17:08:18 +00:00
private static $formatters ;
private static $formats ;
2014-03-01 07:26:09 +00:00
2014-03-01 04:11:27 +00:00
/**
2014-03-01 07:26:09 +00:00
* Constructor .
2014-03-01 04:11:27 +00:00
*
2014-03-01 07:26:09 +00:00
* @ param OutputInterface $output An OutputInterface instance
2014-04-16 09:09:01 +01:00
* @ param int $max Maximum steps ( 0 if unknown )
2014-03-01 04:11:27 +00:00
*/
2014-03-01 07:26:09 +00:00
public function __construct ( OutputInterface $output , $max = 0 )
{
2014-09-04 19:07:35 +01:00
$this -> output = $output ;
2014-07-07 16:02:57 +01:00
$this -> setMaxSteps ( $max );
2014-03-01 07:26:09 +00:00
2014-09-04 19:07:35 +01:00
if ( ! $this -> output -> isDecorated ()) {
// disable overwrite when output does not support ANSI codes.
$this -> overwrite = false ;
if ( $this -> max > 10 ) {
// set a reasonable redraw frequency so output isn't flooded
$this -> setRedrawFrequency ( $max / 10 );
}
}
2014-03-03 09:33:57 +00:00
$this -> setFormat ( $this -> determineBestFormat ());
2014-07-07 14:59:31 +01:00
$this -> startTime = time ();
2014-03-01 07:26:09 +00:00
}
2014-03-01 04:11:27 +00:00
/**
2014-03-01 07:26:09 +00:00
* Sets a placeholder formatter for a given name .
*
* This method also allow you to override an existing placeholder .
2014-03-01 04:11:27 +00:00
*
2014-03-01 07:26:09 +00:00
* @ param string $name The placeholder name ( including the delimiter char like % )
* @ param callable $callable A PHP callable
2014-03-01 04:11:27 +00:00
*/
2014-03-01 16:52:22 +00:00
public static function setPlaceholderFormatterDefinition ( $name , $callable )
2014-03-01 07:26:09 +00:00
{
if ( ! self :: $formatters ) {
self :: $formatters = self :: initPlaceholderFormatters ();
}
self :: $formatters [ $name ] = $callable ;
}
2014-03-01 04:11:27 +00:00
2014-03-01 17:08:18 +00:00
/**
* Gets the placeholder formatter for a given name .
*
* @ param string $name The placeholder name ( including the delimiter char like % )
*
* @ return callable | null A PHP callable
*/
public static function getPlaceholderFormatterDefinition ( $name )
{
2014-03-03 12:22:12 +00:00
if ( ! self :: $formatters ) {
self :: $formatters = self :: initPlaceholderFormatters ();
}
2014-03-01 17:08:18 +00:00
return isset ( self :: $formatters [ $name ]) ? self :: $formatters [ $name ] : null ;
}
2014-03-01 16:52:22 +00:00
/**
* Sets a format for a given name .
*
* This method also allow you to override an existing format .
*
* @ param string $name The format name
* @ param string $format A format string
*/
public static function setFormatDefinition ( $name , $format )
{
if ( ! self :: $formats ) {
self :: $formats = self :: initFormats ();
}
self :: $formats [ $name ] = $format ;
}
2014-03-01 17:08:18 +00:00
/**
* Gets the format for a given name .
*
* @ param string $name The format name
*
* @ return string | null A format string
*/
public static function getFormatDefinition ( $name )
{
2014-03-03 12:22:12 +00:00
if ( ! self :: $formats ) {
self :: $formats = self :: initFormats ();
}
2014-03-01 17:08:18 +00:00
return isset ( self :: $formats [ $name ]) ? self :: $formats [ $name ] : null ;
}
2014-03-01 08:14:29 +00:00
public function setMessage ( $message , $name = 'message' )
{
$this -> messages [ $name ] = $message ;
}
public function getMessage ( $name = 'message' )
{
return $this -> messages [ $name ];
}
2014-03-01 04:11:27 +00:00
/**
2014-03-01 07:26:09 +00:00
* Gets the progress bar start time .
2014-03-01 04:11:27 +00:00
*
2014-12-04 20:26:11 +00:00
* @ return int The progress bar start time
2014-03-01 04:11:27 +00:00
*/
2014-03-01 07:26:09 +00:00
public function getStartTime ()
{
return $this -> startTime ;
}
2014-03-01 04:11:27 +00:00
2014-03-01 07:26:09 +00:00
/**
* Gets the progress bar maximal steps .
*
2014-12-04 20:26:11 +00:00
* @ return int The progress bar max steps
2014-03-01 07:26:09 +00:00
*/
public function getMaxSteps ()
{
return $this -> max ;
}
2014-03-01 04:11:27 +00:00
/**
2014-03-01 07:26:09 +00:00
* Gets the progress bar step .
2014-03-01 04:11:27 +00:00
*
2014-12-21 11:39:54 +00:00
* @ deprecated since version 2.6 , to be removed in 3.0 . Use { @ link getProgress ()} instead .
2014-07-07 14:59:31 +01:00
*
2014-12-04 20:26:11 +00:00
* @ return int The progress bar step
2014-03-01 04:11:27 +00:00
*/
2014-03-01 07:26:09 +00:00
public function getStep ()
2014-07-07 14:59:31 +01:00
{
2015-06-07 07:33:05 +01:00
@ trigger_error ( 'The ' . __METHOD__ . ' method is deprecated since version 2.6 and will be removed in 3.0. Use the getProgress() method instead.' , E_USER_DEPRECATED );
2014-12-21 11:39:54 +00:00
2014-07-07 16:54:11 +01:00
return $this -> getProgress ();
2014-07-07 14:59:31 +01:00
}
/**
2014-07-07 16:54:11 +01:00
* Gets the current step position .
2014-07-07 14:59:31 +01:00
*
* @ return int The progress bar step
*/
2014-07-07 16:54:11 +01:00
public function getProgress ()
2014-03-01 04:11:27 +00:00
{
2014-03-01 07:26:09 +00:00
return $this -> step ;
}
/**
* Gets the progress bar step width .
*
2014-07-07 16:54:11 +01:00
* @ internal This method is public for PHP 5.3 compatibility , it should not be used .
2014-07-07 14:59:31 +01:00
*
2014-12-04 20:26:11 +00:00
* @ return int The progress bar step width
2014-03-01 07:26:09 +00:00
*/
public function getStepWidth ()
{
return $this -> stepWidth ;
}
/**
* Gets the current progress bar percent .
*
2014-07-07 16:54:11 +01:00
* @ return float The current progress bar percent
2014-03-01 07:26:09 +00:00
*/
public function getProgressPercent ()
{
return $this -> percent ;
2014-03-01 04:11:27 +00:00
}
/**
* Sets the progress bar width .
*
2014-12-04 20:26:11 +00:00
* @ param int $size The progress bar size
2014-03-01 04:11:27 +00:00
*/
public function setBarWidth ( $size )
{
$this -> barWidth = ( int ) $size ;
}
2014-03-01 07:26:09 +00:00
/**
* Gets the progress bar width .
*
2014-12-04 20:26:11 +00:00
* @ return int The progress bar size
2014-03-01 07:26:09 +00:00
*/
public function getBarWidth ()
{
return $this -> barWidth ;
}
2014-03-01 04:11:27 +00:00
/**
* Sets the bar character .
*
* @ param string $char A character
*/
public function setBarCharacter ( $char )
{
$this -> barChar = $char ;
}
2014-03-01 07:26:09 +00:00
/**
* Gets the bar character .
*
* @ return string A character
*/
public function getBarCharacter ()
{
2014-07-07 16:54:11 +01:00
if ( null === $this -> barChar ) {
return $this -> max ? '=' : $this -> emptyBarChar ;
}
2014-03-01 07:26:09 +00:00
return $this -> barChar ;
}
2014-03-01 04:11:27 +00:00
/**
* Sets the empty bar character .
*
* @ param string $char A character
*/
public function setEmptyBarCharacter ( $char )
{
$this -> emptyBarChar = $char ;
}
2014-03-01 07:26:09 +00:00
/**
* Gets the empty bar character .
*
* @ return string A character
*/
public function getEmptyBarCharacter ()
{
return $this -> emptyBarChar ;
}
2014-03-01 04:11:27 +00:00
/**
* Sets the progress bar character .
*
* @ param string $char A character
*/
public function setProgressCharacter ( $char )
{
$this -> progressChar = $char ;
}
2014-03-01 07:26:09 +00:00
/**
* Gets the progress bar character .
*
* @ return string A character
*/
public function getProgressCharacter ()
{
return $this -> progressChar ;
}
2014-03-01 04:11:27 +00:00
/**
* Sets the progress bar format .
*
* @ param string $format The format
*/
public function setFormat ( $format )
{
2014-03-03 09:33:57 +00:00
// try to use the _nomax variant if available
2014-07-07 16:54:11 +01:00
if ( ! $this -> max && null !== self :: getFormatDefinition ( $format . '_nomax' )) {
$this -> format = self :: getFormatDefinition ( $format . '_nomax' );
} elseif ( null !== self :: getFormatDefinition ( $format )) {
$this -> format = self :: getFormatDefinition ( $format );
2014-03-03 09:33:57 +00:00
} else {
$this -> format = $format ;
}
2014-03-01 16:52:22 +00:00
$this -> formatLineCount = substr_count ( $this -> format , " \n " );
2014-03-01 04:11:27 +00:00
}
/**
* Sets the redraw frequency .
*
2014-12-04 20:26:11 +00:00
* @ param int $freq The frequency in steps
2014-03-01 04:11:27 +00:00
*/
public function setRedrawFrequency ( $freq )
{
$this -> redrawFreq = ( int ) $freq ;
}
/**
* Starts the progress output .
2014-07-07 14:59:31 +01:00
*
2014-07-07 16:54:11 +01:00
* @ param int | null $max Number of steps to complete the bar ( 0 if indeterminate ), null to leave unchanged
2014-03-01 04:11:27 +00:00
*/
2014-07-07 16:54:11 +01:00
public function start ( $max = null )
2014-03-01 04:11:27 +00:00
{
2014-07-07 16:54:11 +01:00
$this -> startTime = time ();
$this -> step = 0 ;
$this -> percent = 0.0 ;
2014-03-01 04:11:27 +00:00
2014-07-07 16:54:11 +01:00
if ( null !== $max ) {
$this -> setMaxSteps ( $max );
2014-03-01 04:11:27 +00:00
}
$this -> display ();
}
/**
* Advances the progress output X steps .
*
2014-12-04 20:26:11 +00:00
* @ param int $step Number of steps to advance
2014-03-01 04:11:27 +00:00
*
* @ throws \LogicException
*/
public function advance ( $step = 1 )
{
2014-07-07 16:54:11 +01:00
$this -> setProgress ( $this -> step + $step );
2014-03-01 04:11:27 +00:00
}
/**
* Sets the current progress .
*
2014-12-21 11:39:54 +00:00
* @ deprecated since version 2.6 , to be removed in 3.0 . Use { @ link setProgress ()} instead .
2014-07-07 16:54:11 +01:00
*
2014-12-04 20:26:11 +00:00
* @ param int $step The current progress
2014-03-01 04:11:27 +00:00
*
* @ throws \LogicException
*/
public function setCurrent ( $step )
2014-07-07 16:54:11 +01:00
{
2015-06-07 07:33:05 +01:00
@ trigger_error ( 'The ' . __METHOD__ . ' method is deprecated since version 2.6 and will be removed in 3.0. Use the setProgress() method instead.' , E_USER_DEPRECATED );
2014-12-21 11:39:54 +00:00
2014-07-07 16:54:11 +01:00
$this -> setProgress ( $step );
}
2014-09-04 19:07:35 +01:00
/**
2015-07-07 20:01:23 +01:00
* Sets whether to overwrite the progressbar , false for new line .
2014-09-04 19:07:35 +01:00
*
* @ param bool $overwrite
*/
public function setOverwrite ( $overwrite )
{
$this -> overwrite = ( bool ) $overwrite ;
}
2014-07-07 16:54:11 +01:00
/**
* Sets the current progress .
*
2014-12-05 20:11:30 +00:00
* @ param int $step The current progress
2014-07-07 16:54:11 +01:00
*
* @ throws \LogicException
*/
public function setProgress ( $step )
2014-03-01 04:11:27 +00:00
{
$step = ( int ) $step ;
if ( $step < $this -> step ) {
throw new \LogicException ( 'You can\'t regress the progress bar.' );
}
2014-07-07 16:54:11 +01:00
if ( $this -> max && $step > $this -> max ) {
2014-07-07 16:02:57 +01:00
$this -> max = $step ;
2014-03-01 04:11:27 +00:00
}
2015-07-07 20:01:23 +01:00
$prevPeriod = ( int ) ( $this -> step / $this -> redrawFreq );
$currPeriod = ( int ) ( $step / $this -> redrawFreq );
2014-03-01 04:11:27 +00:00
$this -> step = $step ;
2014-07-07 16:54:11 +01:00
$this -> percent = $this -> max ? ( float ) $this -> step / $this -> max : 0 ;
2014-03-01 04:11:27 +00:00
if ( $prevPeriod !== $currPeriod || $this -> max === $step ) {
$this -> display ();
}
}
/**
* Finishes the progress output .
*/
public function finish ()
{
if ( ! $this -> max ) {
$this -> max = $this -> step ;
}
2014-09-04 19:07:35 +01:00
if ( $this -> step === $this -> max && ! $this -> overwrite ) {
// prevent double 100% output
return ;
}
2014-07-07 16:54:11 +01:00
$this -> setProgress ( $this -> max );
2014-03-01 04:11:27 +00:00
}
/**
* Outputs the current progress string .
*/
public function display ()
{
2014-07-07 14:59:31 +01:00
if ( OutputInterface :: VERBOSITY_QUIET === $this -> output -> getVerbosity ()) {
return ;
2014-03-01 04:11:27 +00:00
}
2014-03-01 21:26:36 +00:00
// these 3 variables can be removed in favor of using $this in the closure when support for PHP 5.3 will be dropped.
2014-03-01 07:26:09 +00:00
$self = $this ;
2014-03-01 21:26:36 +00:00
$output = $this -> output ;
$messages = $this -> messages ;
$this -> overwrite ( preg_replace_callback ( " { %([a-z \ -_]+)(?: \ :([^%]+))?%}i " , function ( $matches ) use ( $self , $output , $messages ) {
2014-03-01 17:08:18 +00:00
if ( $formatter = $self :: getPlaceholderFormatterDefinition ( $matches [ 1 ])) {
2014-03-01 21:26:36 +00:00
$text = call_user_func ( $formatter , $self , $output );
} elseif ( isset ( $messages [ $matches [ 1 ]])) {
$text = $messages [ $matches [ 1 ]];
2014-03-01 08:14:29 +00:00
} else {
return $matches [ 0 ];
}
if ( isset ( $matches [ 2 ])) {
$text = sprintf ( '%' . $matches [ 2 ], $text );
}
return $text ;
2014-03-01 07:26:09 +00:00
}, $this -> format ));
2014-03-01 04:11:27 +00:00
}
/**
* Removes the progress bar from the current line .
*
* This is useful if you wish to write some output
* while a progress bar is running .
* Call display () to show the progress bar again .
*/
public function clear ()
{
2014-09-04 19:07:35 +01:00
if ( ! $this -> overwrite ) {
return ;
}
2014-03-01 07:54:45 +00:00
$this -> overwrite ( str_repeat ( " \n " , $this -> formatLineCount ));
2014-03-01 04:11:27 +00:00
}
2014-07-07 16:54:11 +01:00
/**
* Sets the progress bar maximal steps .
*
2015-09-08 23:15:02 +01:00
* @ param int $max The progress bar max steps
2014-07-07 16:54:11 +01:00
*/
private function setMaxSteps ( $max )
{
$this -> max = max ( 0 , ( int ) $max );
$this -> stepWidth = $this -> max ? Helper :: strlen ( $this -> max ) : 4 ;
}
2014-03-01 04:11:27 +00:00
/**
* Overwrites a previous message to the output .
*
* @ param string $message The message
*/
private function overwrite ( $message )
{
2014-03-01 21:26:36 +00:00
$lines = explode ( " \n " , $message );
2014-03-01 04:11:27 +00:00
2014-03-01 21:26:36 +00:00
// append whitespace to match the line's length
if ( null !== $this -> lastMessagesLength ) {
foreach ( $lines as $i => $line ) {
if ( $this -> lastMessagesLength > Helper :: strlenWithoutDecoration ( $this -> output -> getFormatter (), $line )) {
$lines [ $i ] = str_pad ( $line , $this -> lastMessagesLength , " \x20 " , STR_PAD_RIGHT );
}
}
2014-03-01 04:11:27 +00:00
}
2014-09-04 19:07:35 +01:00
if ( $this -> overwrite ) {
// move back to the beginning of the progress bar before redrawing it
$this -> output -> write ( " \x0D " );
} elseif ( $this -> step > 0 ) {
// move to new line
$this -> output -> writeln ( '' );
}
2014-03-01 07:54:45 +00:00
if ( $this -> formatLineCount ) {
$this -> output -> write ( sprintf ( " \033 [%dA " , $this -> formatLineCount ));
}
2014-03-01 21:26:36 +00:00
$this -> output -> write ( implode ( " \n " , $lines ));
2014-03-01 04:11:27 +00:00
2014-03-01 21:26:36 +00:00
$this -> lastMessagesLength = 0 ;
foreach ( $lines as $line ) {
$len = Helper :: strlenWithoutDecoration ( $this -> output -> getFormatter (), $line );
if ( $len > $this -> lastMessagesLength ) {
$this -> lastMessagesLength = $len ;
}
}
2014-03-01 04:11:27 +00:00
}
private function determineBestFormat ()
{
switch ( $this -> output -> getVerbosity ()) {
2014-03-03 09:33:57 +00:00
// OutputInterface::VERBOSITY_QUIET: display is disabled anyway
2014-03-01 04:11:27 +00:00
case OutputInterface :: VERBOSITY_VERBOSE :
2014-07-07 16:54:11 +01:00
return $this -> max ? 'verbose' : 'verbose_nomax' ;
2014-03-01 04:11:27 +00:00
case OutputInterface :: VERBOSITY_VERY_VERBOSE :
2014-07-07 16:54:11 +01:00
return $this -> max ? 'very_verbose' : 'very_verbose_nomax' ;
2014-03-01 04:11:27 +00:00
case OutputInterface :: VERBOSITY_DEBUG :
2014-07-07 16:54:11 +01:00
return $this -> max ? 'debug' : 'debug_nomax' ;
2014-03-01 04:11:27 +00:00
default :
2014-07-07 16:54:11 +01:00
return $this -> max ? 'normal' : 'normal_nomax' ;
2014-03-01 04:11:27 +00:00
}
}
2014-03-01 07:26:09 +00:00
2014-03-01 17:08:18 +00:00
private static function initPlaceholderFormatters ()
2014-03-01 07:26:09 +00:00
{
return array (
2014-03-01 21:26:36 +00:00
'bar' => function ( ProgressBar $bar , OutputInterface $output ) {
2014-07-07 16:54:11 +01:00
$completeBars = floor ( $bar -> getMaxSteps () > 0 ? $bar -> getProgressPercent () * $bar -> getBarWidth () : $bar -> getProgress () % $bar -> getBarWidth ());
2014-03-01 07:26:09 +00:00
$display = str_repeat ( $bar -> getBarCharacter (), $completeBars );
if ( $completeBars < $bar -> getBarWidth ()) {
2014-03-01 21:26:36 +00:00
$emptyBars = $bar -> getBarWidth () - $completeBars - Helper :: strlenWithoutDecoration ( $output -> getFormatter (), $bar -> getProgressCharacter ());
2014-03-01 07:26:09 +00:00
$display .= $bar -> getProgressCharacter () . str_repeat ( $bar -> getEmptyBarCharacter (), $emptyBars );
}
return $display ;
},
2014-03-01 08:14:29 +00:00
'elapsed' => function ( ProgressBar $bar ) {
return Helper :: formatTime ( time () - $bar -> getStartTime ());
2014-03-01 07:26:09 +00:00
},
2014-03-01 08:14:29 +00:00
'remaining' => function ( ProgressBar $bar ) {
2014-03-01 07:26:32 +00:00
if ( ! $bar -> getMaxSteps ()) {
throw new \LogicException ( 'Unable to display the remaining time if the maximum number of steps is not set.' );
}
2014-07-07 16:54:11 +01:00
if ( ! $bar -> getProgress ()) {
2014-03-01 07:26:32 +00:00
$remaining = 0 ;
} else {
2014-07-07 16:54:11 +01:00
$remaining = round (( time () - $bar -> getStartTime ()) / $bar -> getProgress () * ( $bar -> getMaxSteps () - $bar -> getProgress ()));
2014-03-01 07:26:32 +00:00
}
2014-03-01 08:14:29 +00:00
return Helper :: formatTime ( $remaining );
2014-03-01 07:26:32 +00:00
},
2014-03-01 08:14:29 +00:00
'estimated' => function ( ProgressBar $bar ) {
2014-03-01 07:26:32 +00:00
if ( ! $bar -> getMaxSteps ()) {
throw new \LogicException ( 'Unable to display the estimated time if the maximum number of steps is not set.' );
}
2014-07-07 16:54:11 +01:00
if ( ! $bar -> getProgress ()) {
2014-03-01 07:26:32 +00:00
$estimated = 0 ;
} else {
2014-07-07 16:54:11 +01:00
$estimated = round (( time () - $bar -> getStartTime ()) / $bar -> getProgress () * $bar -> getMaxSteps ());
2014-03-01 07:26:32 +00:00
}
2014-03-01 08:14:29 +00:00
return Helper :: formatTime ( $estimated );
2014-03-01 07:26:32 +00:00
},
2014-03-01 08:14:29 +00:00
'memory' => function ( ProgressBar $bar ) {
return Helper :: formatMemory ( memory_get_usage ( true ));
2014-03-01 07:26:32 +00:00
},
2014-03-01 08:14:29 +00:00
'current' => function ( ProgressBar $bar ) {
2014-07-07 16:54:11 +01:00
return str_pad ( $bar -> getProgress (), $bar -> getStepWidth (), ' ' , STR_PAD_LEFT );
2014-03-01 07:26:09 +00:00
},
2014-03-01 08:14:29 +00:00
'max' => function ( ProgressBar $bar ) {
2014-03-01 07:26:09 +00:00
return $bar -> getMaxSteps ();
},
2014-03-01 08:14:29 +00:00
'percent' => function ( ProgressBar $bar ) {
return floor ( $bar -> getProgressPercent () * 100 );
2014-03-01 07:26:09 +00:00
},
);
}
2014-03-01 16:52:22 +00:00
2014-03-01 17:08:18 +00:00
private static function initFormats ()
2014-03-01 16:52:22 +00:00
{
return array (
2014-10-30 20:17:55 +00:00
'normal' => ' %current%/%max% [%bar%] %percent:3s%%' ,
'normal_nomax' => ' %current% [%bar%]' ,
2014-03-03 09:33:57 +00:00
2014-10-30 20:17:55 +00:00
'verbose' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%' ,
'verbose_nomax' => ' %current% [%bar%] %elapsed:6s%' ,
2014-03-03 09:33:57 +00:00
2014-10-30 20:17:55 +00:00
'very_verbose' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s%' ,
2014-07-03 13:18:43 +01:00
'very_verbose_nomax' => ' %current% [%bar%] %elapsed:6s%' ,
2014-03-03 09:33:57 +00:00
2014-10-30 20:17:55 +00:00
'debug' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s%' ,
'debug_nomax' => ' %current% [%bar%] %elapsed:6s% %memory:6s%' ,
2014-03-01 16:52:22 +00:00
);
}
2014-03-01 04:11:27 +00:00
}