added missing interfaces
parent
6caa77fbbf
commit
d7fe0dfda4
|
@ -15,21 +15,9 @@ namespace Composer\Downloader;
|
||||||
use Composer\Package\PackageInterface;
|
use Composer\Package\PackageInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Package Downloader
|
* @author Konstantin Kudryashov <ever.zet@gmail.com>
|
||||||
*
|
*/
|
||||||
* @author Kirill chEbba Chebunin <iam@chebba.org>
|
interface DownloaderInterface
|
||||||
*/
|
|
||||||
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);
|
function download(PackageInterface $package, $path, $url, $checksum = null);
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,4 +42,4 @@ class GitDownloader implements DownloaderInterface
|
||||||
system('git archive --format=tar --prefix='.escapeshellarg($package->getName()).' --remote='.escapeshellarg($url).' master | tar -xf -');
|
system('git archive --format=tar --prefix='.escapeshellarg($package->getName()).' --remote='.escapeshellarg($url).' master | tar -xf -');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,4 +66,4 @@ class PearDownloader implements DownloaderInterface
|
||||||
}
|
}
|
||||||
chdir($cwd);
|
chdir($cwd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,4 +73,4 @@ class ZipDownloader implements DownloaderInterface
|
||||||
throw new \UnexpectedValueException($zipName.' is not a valid zip archive, got error code '.$retval);
|
throw new \UnexpectedValueException($zipName.' is not a valid zip archive, got error code '.$retval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue