1
0
Fork 0

added missing interfaces

pull/19/head
everzet 2011-09-17 16:12:45 +03:00
parent 6caa77fbbf
commit d7fe0dfda4
4 changed files with 6 additions and 18 deletions

View File

@ -15,21 +15,9 @@ namespace Composer\Downloader;
use Composer\Package\PackageInterface;
/**
* Package Downloader
*
* @author Kirill chEbba Chebunin <iam@chebba.org>
*/
interface DownloaderInterface
* @author Konstantin Kudryashov <ever.zet@gmail.com>
*/
interface DownloaderInterface
{
/**
* Download package
*
* @param PackageInterface $package Downloaded package
* @param string $path Download to
* @param string $url Download from
* @param string|null $checksum Package checksum
*
* @throws \UnexpectedValueException
*/
function download(PackageInterface $package, $path, $url, $checksum = null);
}

View File

@ -42,4 +42,4 @@ class GitDownloader implements DownloaderInterface
system('git archive --format=tar --prefix='.escapeshellarg($package->getName()).' --remote='.escapeshellarg($url).' master | tar -xf -');
}
}
}
}

View File

@ -66,4 +66,4 @@ class PearDownloader implements DownloaderInterface
}
chdir($cwd);
}
}
}

View File

@ -73,4 +73,4 @@ class ZipDownloader implements DownloaderInterface
throw new \UnexpectedValueException($zipName.' is not a valid zip archive, got error code '.$retval);
}
}
}
}