public function progressBar($total = null, $done = null, $width = null) {
        if (empty($total) || ($total <= 0)) {
            return false;
        }

        //calculate width
        $columns = $this->getScreen('columns');
        if ($columns < 50)
            return false;
        if (null === $width) {
            $width = 200;
        }
        $extraWidth = strlen((string)$total) * 2 + 1;
        if ($width + 35 + $extraWidth > $columns) {
            $width = $columns - 35 - $extraWidth;
        }

        $this->activeProgressBar = array(
            'width' => $width,
            'done' => $done,
            'total' => $total,
            'startTime' => microtime(true),
            'startProgress' => $done,
        );
        $this->progress(null, null, null, 0);
    }
public function progressBar($total = null, $done = null, $width = null) {
        if (empty($total) || ($total <= 0)) {
            return false;
        }

        //calculate width
        $columns = $this->getScreen('columns');
        if ($columns < 50)
            return false;
        if (null === $width) {
            $width = 200;
        }
        $extraWidth = strlen((string)$total) * 2 + 1;
        if ($width + 35 + $extraWidth > $columns) {
            $width = $columns - 35 - $extraWidth;
        }

        $this->activeProgressBar = array(
            'width' => $width,
            'done' => $done,
            'total' => $total,
            'startTime' => microtime(true),
            'startProgress' => $done,
        );
        $this->progress(null, null, null, 0);
    }
public function progressBar ( $ total = null , $ done = null , $ width = null ) { if ( empty ( $ total ) || ( $ total <= 0 ) ) { return false ; } //calculate width $ columns = $ this -> getScreen ( 'columns' ) ; if ( $ columns < 50 ) return false ; if ( null === $ width ) { $ width = 200 ; } $ extraWidth = strlen ( ( string ) $ total ) * 2 + 1 ; if ( $ width + 35 + $ extraWidth > $ columns ) { $ width = $ columns - 35 - $ extraWidth ; } $ this -> activeProgressBar = array ( 'width' => $ width , 'done' => $ done , 'total' => $ total , 'startTime' => microtime ( true ) , 'startProgress' => $ done , ) ; $ this -> progress ( null , null , null , 0 ) ; }
Start a progress bar;
@param int $total
@param int $done
@param int $width
@return boolean
Start a progress bar ;