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; } }