PHP Class CraftCli\Support\Downloader\BaseDownloader

Datei anzeigen Open project: rsanchez/craft-cli

Protected Properties

Property Type Description
$output Symfony\Component\Console\Output\OutputInterface
$path string Path to download the file
$progressBar Symfony\Component\Console\Helper\ProgressBar
$url string Url to download

Public Methods

Method Description
download ( ) : string Download the file to the specified path
setOutput ( Symfony\Component\Console\Output\OutputInterface $output ) Set the output

Protected Methods

Method Description
showDownloadProgress ( $notificationCode, $severity, $message, $messageCode, $bytesTransferred, $bytesMax ) : void ProgressBar callback

Method Details

download() public method

Download the file to the specified path
public download ( ) : string
return string path to the downloaded file

setOutput() public method

Set the output
public setOutput ( Symfony\Component\Console\Output\OutputInterface $output )
$output Symfony\Component\Console\Output\OutputInterface

showDownloadProgress() protected method

ProgressBar callback
protected showDownloadProgress ( $notificationCode, $severity, $message, $messageCode, $bytesTransferred, $bytesMax ) : void
$notificationCode
$severity
$message
$messageCode
$bytesTransferred
$bytesMax
return void

Property Details

$output protected_oe property

protected OutputInterface,Symfony\Component\Console\Output $output
return Symfony\Component\Console\Output\OutputInterface

$path protected_oe property

Path to download the file
protected string $path
return string

$progressBar protected_oe property

protected ProgressBar,Symfony\Component\Console\Helper $progressBar
return Symfony\Component\Console\Helper\ProgressBar

$url protected_oe property

Url to download
protected string $url
return string