Update to Drupal 8.0-dev-2015-11-17. Commits through da81cd220, Tue Nov 17 15:53:49 2015 +0000, Issue #2617224 by Wim Leers: Move around/fix some documentation.
This commit is contained in:
parent
4afb23bbd3
commit
7784f4c23d
929 changed files with 19798 additions and 5304 deletions
44
vendor/symfony/console/Helper/ProgressBar.php
vendored
44
vendor/symfony/console/Helper/ProgressBar.php
vendored
|
@ -27,7 +27,8 @@ class ProgressBar
|
|||
private $barChar;
|
||||
private $emptyBarChar = '-';
|
||||
private $progressChar = '>';
|
||||
private $format = null;
|
||||
private $format;
|
||||
private $internalFormat;
|
||||
private $redrawFreq = 1;
|
||||
|
||||
/**
|
||||
|
@ -72,8 +73,6 @@ class ProgressBar
|
|||
}
|
||||
}
|
||||
|
||||
$this->setFormat($this->determineBestFormat());
|
||||
|
||||
$this->startTime = time();
|
||||
}
|
||||
|
||||
|
@ -310,16 +309,8 @@ class ProgressBar
|
|||
*/
|
||||
public function setFormat($format)
|
||||
{
|
||||
// try to use the _nomax variant if available
|
||||
if (!$this->max && null !== self::getFormatDefinition($format.'_nomax')) {
|
||||
$this->format = self::getFormatDefinition($format.'_nomax');
|
||||
} elseif (null !== self::getFormatDefinition($format)) {
|
||||
$this->format = self::getFormatDefinition($format);
|
||||
} else {
|
||||
$this->format = $format;
|
||||
}
|
||||
|
||||
$this->formatLineCount = substr_count($this->format, "\n");
|
||||
$this->format = null;
|
||||
$this->internalFormat = $format;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -441,6 +432,10 @@ class ProgressBar
|
|||
return;
|
||||
}
|
||||
|
||||
if (null === $this->format) {
|
||||
$this->setRealFormat($this->internalFormat ?: $this->determineBestFormat());
|
||||
}
|
||||
|
||||
// these 3 variables can be removed in favor of using $this in the closure when support for PHP 5.3 will be dropped.
|
||||
$self = $this;
|
||||
$output = $this->output;
|
||||
|
@ -475,9 +470,32 @@ class ProgressBar
|
|||
return;
|
||||
}
|
||||
|
||||
if (null === $this->format) {
|
||||
$this->setRealFormat($this->internalFormat ?: $this->determineBestFormat());
|
||||
}
|
||||
|
||||
$this->overwrite(str_repeat("\n", $this->formatLineCount));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the progress bar format.
|
||||
*
|
||||
* @param string $format The format
|
||||
*/
|
||||
private function setRealFormat($format)
|
||||
{
|
||||
// try to use the _nomax variant if available
|
||||
if (!$this->max && null !== self::getFormatDefinition($format.'_nomax')) {
|
||||
$this->format = self::getFormatDefinition($format.'_nomax');
|
||||
} elseif (null !== self::getFormatDefinition($format)) {
|
||||
$this->format = self::getFormatDefinition($format);
|
||||
} else {
|
||||
$this->format = $format;
|
||||
}
|
||||
|
||||
$this->formatLineCount = substr_count($this->format, "\n");
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the progress bar maximal steps.
|
||||
*
|
||||
|
|
Reference in a new issue