SplitterInterface.php 1010 B

1234567891011121314151617181920212223242526272829303132333435363738
  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) fruux GmbH (https://fruux.com/)
  13. * @author Dominik Tobschall (http://tobschall.de/)
  14. * @license http://sabre.io/license/ Modified BSD License
  15. */
  16. interface SplitterInterface
  17. {
  18. /**
  19. * Constructor.
  20. *
  21. * The splitter should receive an readable file stream as its input.
  22. *
  23. * @param resource $input
  24. */
  25. public function __construct($input);
  26. /**
  27. * Every time getNext() is called, a new object will be parsed, until we
  28. * hit the end of the stream.
  29. *
  30. * When the end is reached, null will be returned.
  31. *
  32. * @return \Sabre\VObject\Component|null
  33. */
  34. public function getNext();
  35. }