RecipientIterator.php 760B

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. * @package Swift
  12. * @subpackage Mailer
  13. * @author Chris Corbyn
  14. */
  15. interface Swift_Mailer_RecipientIterator
  16. {
  17. /**
  18. * Returns true only if there are more recipients to send to.
  19. * @return boolean
  20. */
  21. public function hasNext();
  22. /**
  23. * Returns an array where the keys are the addresses of recipients and the
  24. * values are the names.
  25. * e.g. ('foo@bar' => 'Foo') or ('foo@bar' => NULL)
  26. * @return array
  27. */
  28. public function nextRecipient();
  29. }