ZipInputStreamInterface.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. namespace PhpZip\Stream;
  3. use PhpZip\Model\ZipEntry;
  4. use PhpZip\Model\ZipModel;
  5. /**
  6. * Read zip file
  7. *
  8. * @author Ne-Lexa alexey@nelexa.ru
  9. * @license MIT
  10. */
  11. interface ZipInputStreamInterface
  12. {
  13. /**
  14. * @return ZipModel
  15. */
  16. public function readZip();
  17. /**
  18. * @return ZipEntry
  19. */
  20. public function readEntry();
  21. /**
  22. * @param ZipEntry $entry
  23. * @return string
  24. */
  25. public function readEntryContent(ZipEntry $entry);
  26. /**
  27. * @return resource
  28. */
  29. public function getStream();
  30. /**
  31. * Copy the input stream of the LOC entry zip and the data into
  32. * the output stream and zip the alignment if necessary.
  33. *
  34. * @param ZipEntry $entry
  35. * @param ZipOutputStreamInterface $out
  36. */
  37. public function copyEntry(ZipEntry $entry, ZipOutputStreamInterface $out);
  38. /**
  39. * @param ZipEntry $entry
  40. * @param ZipOutputStreamInterface $out
  41. */
  42. public function copyEntryData(ZipEntry $entry, ZipOutputStreamInterface $out);
  43. public function close();
  44. }