RecipientIterator.php 793B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /*
  3. * This file is part of SwiftMailer.
  4. * (c) 2004-2009 Chris Corbyn
  5. *
  6. * For the full copyright and license information, please view the LICENSE
  7. * file that was distributed with this source code.
  8. */
  9. /**
  10. * Provides an abstract way of specifying recipients for batch sending.
  11. *
  12. * @package Swift
  13. * @subpackage Mailer
  14. * @author Chris Corbyn
  15. */
  16. interface Swift_Mailer_RecipientIterator
  17. {
  18. /**
  19. * Returns true only if there are more recipients to send to.
  20. *
  21. * @return boolean
  22. */
  23. public function hasNext();
  24. /**
  25. * Returns an array where the keys are the addresses of recipients and the
  26. * values are the names. e.g. ('foo@bar' => 'Foo') or ('foo@bar' => NULL)
  27. *
  28. * @return array
  29. */
  30. public function nextRecipient();
  31. }