PoWriterInterface.php 649 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace Drupal\Component\Gettext;
  3. /**
  4. * Shared interface definition for all Gettext PO Writers.
  5. */
  6. interface PoWriterInterface extends PoMetadataInterface {
  7. /**
  8. * Writes the given item.
  9. *
  10. * @param PoItem $item
  11. * One specific item to write.
  12. */
  13. public function writeItem(PoItem $item);
  14. /**
  15. * Writes all or the given amount of items.
  16. *
  17. * @param PoReaderInterface $reader
  18. * Reader to read PoItems from.
  19. * @param $count
  20. * Amount of items to read from $reader to write. If -1, all items are
  21. * read from $reader.
  22. */
  23. public function writeItems(PoReaderInterface $reader, $count = -1);
  24. }