src/TerminalObject/Dynamic/Progress.php
protected function getProgressBar($current, $label)
    {
        if ($this->first_line) {
            // Drop down a line, we are about to
            // re-write this line for the progress bar
            $this->output->write('');
            $this->first_line = false;
        }

        // Move the cursor up and clear it to the end
        $line_count = $this->has_label_line ? 2 : 1;

        $progress_bar  = $this->util->cursor->up($line_count);
        $progress_bar .= $this->util->cursor->startOfCurrentLine();
        $progress_bar .= $this->util->cursor->deleteCurrentLine();
        $progress_bar .= $this->getProgressBarStr($current, $label);

        // If this line has a label then set that this progress bar has a label line
        if (strlen($label) > 0) {
            $this->has_label_line = true;
        }

        return $progress_bar;
    }
protected function getProgressBar($current, $label)
    {
        if ($this->first_line) {
            // Drop down a line, we are about to
            // re-write this line for the progress bar
            $this->output->write('');
            $this->first_line = false;
        }

        // Move the cursor up and clear it to the end
        $line_count = $this->has_label_line ? 2 : 1;

        $progress_bar  = $this->util->cursor->up($line_count);
        $progress_bar .= $this->util->cursor->startOfCurrentLine();
        $progress_bar .= $this->util->cursor->deleteCurrentLine();
        $progress_bar .= $this->getProgressBarStr($current, $label);

        // If this line has a label then set that this progress bar has a label line
        if (strlen($label) > 0) {
            $this->has_label_line = true;
        }

        return $progress_bar;
    }
protected function getProgressBar ( $ current , $ label ) { if ( $ this -> first_line ) { // Drop down a line, we are about to // re-write this line for the progress bar $ this -> output -> write ( '' ) ; $ this -> first_line = false ; } // Move the cursor up and clear it to the end $ line_count = $ this -> has_label_line ? 2 : 1 ; $ progress_bar = $ this -> util -> cursor -> up ( $ line_count ) ; $ progress_bar .= $ this -> util -> cursor -> startOfCurrentLine ( ) ; $ progress_bar .= $ this -> util -> cursor -> deleteCurrentLine ( ) ; $ progress_bar .= $ this -> getProgressBarStr ( $ current , $ label ) ; // If this line has a label then set that this progress bar has a label line if ( strlen ( $ label ) > 0 ) { $ this -> has_label_line = true ; } return $ progress_bar ; }
Build the progress bar str and return it

@param integer $current
@param string $label

@return string
Build the progress bar str and return it