1
0
Fork 0

DownloaderInterface refactored

pull/19/head
everzet 2011-09-24 02:18:41 +03:00
parent 69f1de9986
commit 5b0d17cc13
1 changed files with 27 additions and 1 deletions

View File

@ -15,10 +15,36 @@ namespace Composer\Downloader;
use Composer\Package\PackageInterface;
/**
* Downloader interface.
*
* @author Konstantin Kudryashov <ever.zet@gmail.com>
*/
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 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);
}