PHP Class PhpBrew\Downloader\BaseDownloader

Datei anzeigen Open project: phpbrew/phpbrew

Protected Properties

Property Type Description
$logger
$options

Public Methods

Method Description
__construct ( CLIFramework\Logger $logger, OptionResult $options )
download ( string $url, string $targetFilePath = null ) : boolean | string
hasSupport ( $requireSsl )
request ( $url ) : boolean | string fetch the remote content.
resolveDownloadFileName ( string $url ) : string | boolean

Protected Methods

Method Description
process ( $url, $targetFilePath )

Method Details

__construct() public method

public __construct ( CLIFramework\Logger $logger, OptionResult $options )
$logger CLIFramework\Logger
$options GetOptionKit\OptionResult

download() public method

public download ( string $url, string $targetFilePath = null ) : boolean | string
$url string the url to be downloaded
$targetFilePath string the path where file to be saved. null means auto-generated temp path
return boolean | string if download successfully, return target file path, otherwise return false.

hasSupport() abstract public method

abstract public hasSupport ( $requireSsl )

process() abstract protected method

abstract protected process ( $url, $targetFilePath )

request() public method

fetch the remote content.
public request ( $url ) : boolean | string
$url the url to be downloaded
return boolean | string return content if download successfully, otherwise false is returned

resolveDownloadFileName() public method

public resolveDownloadFileName ( string $url ) : string | boolean
$url string
return string | boolean the resolved download file name or false it the url string can't be parsed

Property Details

$logger protected_oe property

protected $logger

$options protected_oe property

protected $options