From 5b0d17cc1304c9f1b9505d66ee8c167b0301c4be Mon Sep 17 00:00:00 2001 From: everzet Date: Sat, 24 Sep 2011 02:18:41 +0300 Subject: [PATCH] DownloaderInterface refactored --- .../Downloader/DownloaderInterface.php | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/Composer/Downloader/DownloaderInterface.php b/src/Composer/Downloader/DownloaderInterface.php index 4416ac46e..7a114ea2b 100644 --- a/src/Composer/Downloader/DownloaderInterface.php +++ b/src/Composer/Downloader/DownloaderInterface.php @@ -15,10 +15,36 @@ namespace Composer\Downloader; use Composer\Package\PackageInterface; /** + * Downloader interface. + * * @author Konstantin Kudryashov */ 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); }