Iterator.php 993 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * Swift Mailer Iterator Interface
  4. * Please read the LICENSE file
  5. * @author Chris Corbyn <chris@w3style.co.uk>
  6. * @package Swift
  7. * @license GNU Lesser General Public License
  8. */
  9. /**
  10. * Swift Iterator Interface
  11. * Provides the interface for iterators used for retrieving addresses in batch sends.
  12. * @package Swift
  13. * @author Chris Corbyn <chris@w3style.co.uk>
  14. */
  15. interface Swift_Iterator
  16. {
  17. /**
  18. * Check if there is a value in the list after the current one.
  19. * @return boolean
  20. */
  21. public function hasNext();
  22. /**
  23. * Move to the next position in the list if possible.
  24. * @return boolean
  25. */
  26. public function next();
  27. /**
  28. * Seek to the given numeric index in the list of possible.
  29. * @return boolean
  30. */
  31. public function seekTo($pos);
  32. /**
  33. * Get the value of the list at the current position.
  34. * @return mixed
  35. */
  36. public function getValue();
  37. /**
  38. * Get the current list position.
  39. * @return int
  40. */
  41. public function getPosition();
  42. }