ArchiverInterface.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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\Package\Archiver;
  12. /**
  13. * @author Till Klampaeckel <till@php.net>
  14. * @author Matthieu Moquet <matthieu@moquet.net>
  15. * @author Nils Adermann <naderman@naderman.de>
  16. */
  17. interface ArchiverInterface
  18. {
  19. /**
  20. * Create an archive from the sources.
  21. *
  22. * @param string $sources The sources directory
  23. * @param string $target The target file
  24. * @param string $format The format used for archive
  25. * @param array $excludes A list of patterns for files to exclude
  26. *
  27. * @return string The path to the written archive file
  28. */
  29. public function archive($sources, $target, $format, array $excludes = array(), $ignoreFilters = false);
  30. /**
  31. * Format supported by the archiver.
  32. *
  33. * @param string $format The archive format
  34. * @param string $sourceType The source type (git, svn, hg, etc.)
  35. *
  36. * @return bool true if the format is supported by the archiver
  37. */
  38. public function supports($format, $sourceType);
  39. }