phpbb\install\helper\iohandler\cli_iohandler::set_task_count PHP Method

set_task_count() public method

public set_task_count ( $task_count, $restart = false )
    public function set_task_count($task_count, $restart = false)
    {
        parent::set_task_count($task_count, $restart);
        if ($this->output->getVerbosity() === OutputInterface::VERBOSITY_NORMAL) {
            if ($this->progress_bar !== null) {
                // Symfony's ProgressBar is immutable regarding task_count, so delete the old and create a new one.
                $this->progress_bar->clear();
            } else {
                $this->io->newLine(2);
            }
            $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->progress_bar->start();
        }
    }