SplitterInterface.php 998 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace Sabre\VObject\Splitter;
  3. /**
  4. * VObject splitter
  5. *
  6. * The splitter is responsible for reading a large vCard or iCalendar object,
  7. * and splitting it into multiple objects.
  8. *
  9. * This is for example for Card and CalDAV, which require every event and vcard
  10. * to exist in their own objects, instead of one large one.
  11. *
  12. * @copyright Copyright (C) 2007-2014 fruux GmbH (https://fruux.com/).
  13. * @author Dominik Tobschall
  14. * @license http://sabre.io/license/ Modified BSD License
  15. */
  16. interface SplitterInterface {
  17. /**
  18. * Constructor
  19. *
  20. * The splitter should receive an readable file stream as it's input.
  21. *
  22. * @param resource $input
  23. */
  24. public function __construct($input);
  25. /**
  26. * Every time getNext() is called, a new object will be parsed, until we
  27. * hit the end of the stream.
  28. *
  29. * When the end is reached, null will be returned.
  30. *
  31. * @return Sabre\VObject\Component|null
  32. */
  33. public function getNext();
  34. }