12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- namespace Composer\Downloader;
- use Composer\Package\PackageInterface;
- class PearDownloader extends FileDownloader
- {
-
- public function download(PackageInterface $package, $path)
- {
- parent::download($package, $path);
- $fileName = $this->getFileName($package, $path);
- if ($this->io->isVerbose()) {
- $this->io->write(' Installing PEAR package');
- }
- try {
- $pearExtractor = new PearPackageExtractor($fileName);
- $pearExtractor->extractTo($path);
- if ($this->io->isVerbose()) {
- $this->io->write(' Cleaning up');
- }
- unlink($fileName);
- } catch (\Exception $e) {
-
- $this->filesystem->removeDirectory($path);
- throw $e;
- }
- $this->io->write('');
- }
- }
|