DownloaderInterface.php 854 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /*
  3. * This file is part of Composer.
  4. *
  5. * (c) Nils Adermann <naderman@naderman.de>
  6. * Jordi Boggiano <j.boggiano@seld.be>
  7. *
  8. * For the full copyright and license information, please view the LICENSE
  9. * file that was distributed with this source code.
  10. */
  11. namespace Composer\Downloader;
  12. use Composer\Package\PackageInterface;
  13. /**
  14. * Package Downloader
  15. *
  16. * @author Kirill chEbba Chebunin <iam@chebba.org>
  17. */
  18. interface DownloaderInterface
  19. {
  20. /**
  21. * Download package
  22. *
  23. * @param PackageInterface $package Downloaded package
  24. * @param string $path Download to
  25. * @param string $url Download from
  26. * @param string|null $checksum Package checksum
  27. *
  28. * @throws \UnexpectedValueException
  29. */
  30. function download(PackageInterface $package, $path, $url, $checksum = null);
  31. }