Documentation

RarDownloader extends ArchiveDownloader
in package

RAR archive downloader.

Based on previous work by Jordi Boggiano (ZipDownloader).

Tags
author

Derrick Nelson drrcknlsn@gmail.com

Table of Contents

$cache  : mixed
$config  : mixed
$filesystem  : mixed
$io  : mixed
$outputProgress  : mixed
$process  : mixed
$rfs  : mixed
$eventDispatcher  : mixed
$lastCacheWrites  : mixed
__construct()  : mixed
download()  : mixed
Downloads specific package into specific folder.
getInstallationSource()  : string
Returns installation source (either source or dist).
getLocalChanges()  : string|null
Checks for changes to the local copy
remove()  : mixed
Removes specific package from specific folder.
setOutputProgress()  : DownloaderInterface
Sets whether to output download progress information or not
update()  : mixed
Updates specific package in specific folder from initial to target version.
clearLastCacheWrite()  : mixed
doDownload()  : mixed
extract()  : mixed
Extract file to directory
getFileName()  : string
Gets file name for specific package
processUrl()  : string
Process the download url
getCacheKey()  : mixed
getFolderContent()  : array<string|int, SplFileInfo>
Returns the folder content, excluding dotfiles

Properties

Methods

download()

Downloads specific package into specific folder.

public download(PackageInterface $package, mixed $path[, mixed $output = true ]) : mixed
Parameters
$package : PackageInterface

package instance

$path : mixed

download path

$output : mixed = true
Return values
mixed

getInstallationSource()

Returns installation source (either source or dist).

public getInstallationSource() : string
Return values
string

"source" or "dist"

getLocalChanges()

Checks for changes to the local copy

public getLocalChanges(PackageInterface $package, mixed $targetDir) : string|null
Parameters
$package : PackageInterface

package instance

$targetDir : mixed
Tags
throws
RuntimeException
Return values
string|null

changes or null

remove()

Removes specific package from specific folder.

public remove(PackageInterface $package, mixed $path[, mixed $output = true ]) : mixed
Parameters
$package : PackageInterface

package instance

$path : mixed

download path

$output : mixed = true
Return values
mixed

extract()

Extract file to directory

protected extract(mixed $file, mixed $path) : mixed
Parameters
$file : mixed

Extracted file

$path : mixed

Directory

Return values
mixed

getFileName()

Gets file name for specific package

protected getFileName(PackageInterface $package, string $path) : string
Parameters
$package : PackageInterface

package instance

$path : string

download path

Return values
string

file name

processUrl()

Process the download url

protected processUrl(PackageInterface $package, string $url) : string
Parameters
$package : PackageInterface

package the url is coming from

$url : string

download url

Tags
throws
RuntimeException

If any problem with the url

Return values
string

url

getFolderContent()

Returns the folder content, excluding dotfiles

private getFolderContent(string $dir) : array<string|int, SplFileInfo>
Parameters
$dir : string

Directory

Return values
array<string|int, SplFileInfo>

Search results