CraftCli\Support\Downloader\BaseDownloader::showDownloadProgress PHP Method

showDownloadProgress() protected method

ProgressBar callback
protected showDownloadProgress ( $notificationCode, $severity, $message, $messageCode, $bytesTransferred, $bytesMax ) : void
$notificationCode
$severity
$message
$messageCode
$bytesTransferred
$bytesMax
return void
    protected function showDownloadProgress($notificationCode, $severity, $message, $messageCode, $bytesTransferred, $bytesMax)
    {
        switch ($notificationCode) {
            case STREAM_NOTIFY_FILE_SIZE_IS:
                if ($this->output) {
                    $this->progressBar = new ProgressBar($this->output, $bytesMax);
                }
                break;
            case STREAM_NOTIFY_PROGRESS:
                if ($this->progressBar) {
                    $this->progressBar->setProgress($bytesTransferred);
                }
                break;
        }
    }