DownloaderInterface refactored
parent
69f1de9986
commit
5b0d17cc13
|
@ -15,10 +15,36 @@ namespace Composer\Downloader;
|
||||||
use Composer\Package\PackageInterface;
|
use Composer\Package\PackageInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Downloader interface.
|
||||||
|
*
|
||||||
* @author Konstantin Kudryashov <ever.zet@gmail.com>
|
* @author Konstantin Kudryashov <ever.zet@gmail.com>
|
||||||
*/
|
*/
|
||||||
interface DownloaderInterface
|
interface DownloaderInterface
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Downloads specific package into specific folder.
|
||||||
|
*
|
||||||
|
* @param PackageInterface $package package instance
|
||||||
|
* @param string $path download path
|
||||||
|
* @param string $url download url
|
||||||
|
* @param string $checksum package checksum (for dists)
|
||||||
|
*/
|
||||||
function download(PackageInterface $package, $path, $url, $checksum = null);
|
function download(PackageInterface $package, $path, $url, $checksum = null);
|
||||||
function isDownloaded(PackageInterface $package, $path);
|
|
||||||
|
/**
|
||||||
|
* Updates specific package in specific folder from initial to target version.
|
||||||
|
*
|
||||||
|
* @param PackageInterface $initial initial package
|
||||||
|
* @param PackageInterface $target updated package
|
||||||
|
* @param string $path download path
|
||||||
|
*/
|
||||||
|
function update(PackageInterface $initial, PackageInterface $target, $path);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes specific package from specific folder.
|
||||||
|
*
|
||||||
|
* @param PackageInterface $package package instance
|
||||||
|
* @param string $path download path
|
||||||
|
*/
|
||||||
|
function remove(PackageInterface $package, $path);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue