/** * {@inheritdoc} */ public function set_task_count($task_count, $restart = false) { parent::set_task_count($task_count, $restart); if ($this->output->getVerbosity() === OutputInterface::VERBOSITY_NORMAL) { $this->progress_bar = $this->io->createProgressBar($task_count); $this->progress_bar->setFormat(" %current:3s%/%max:-3s% %bar% %percent:3s%%\n" . " %message%\n"); $this->progress_bar->setBarWidth(60); if (!defined('PHP_WINDOWS_VERSION_BUILD')) { $this->progress_bar->setEmptyBarCharacter('░'); // light shade character \u2591 $this->progress_bar->setProgressCharacter(''); $this->progress_bar->setBarCharacter('▓'); // dark shade character \u2593 } $this->progress_bar->setMessage(''); $this->io->newLine(2); $this->progress_bar->start(); } }
/** * {@inheritdoc} */ public function createProgressBar($max = 0) { $progressBar = parent::createProgressBar($max); if ('\\' === DIRECTORY_SEPARATOR) { $progressBar->setEmptyBarCharacter('░'); // light shade character \u2591 $progressBar->setProgressCharacter(''); $progressBar->setBarCharacter('▓'); // dark shade character \u2593 } return $progressBar; }
public function createProgressBar($max = 0) { $progressBar = parent::createProgressBar($max); if ('\\' !== DIRECTORY_SEPARATOR) { $progressBar->setEmptyBarCharacter('░'); $progressBar->setProgressCharacter(''); $progressBar->setBarCharacter('▓'); } return $progressBar; }