Class Swift_Mailer_ArrayRecipientIterator

InheritanceSwift_Mailer_ArrayRecipientIterator
ImplementsSwift_Mailer_RecipientIterator

Wraps a standard PHP array in an iterator.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() Create a new ArrayRecipientIterator from $recipients. Swift_Mailer_ArrayRecipientIterator
hasNext() Returns true only if there are more recipients to send to. Swift_Mailer_ArrayRecipientIterator
nextRecipient() Returns an array where the keys are the addresses of recipients and the values are the names. e.g. ('foo@bar' => 'Foo') or ('foo@bar' => NULL). Swift_Mailer_ArrayRecipientIterator

Method Details

__construct() public method

Create a new ArrayRecipientIterator from $recipients.

public void __construct ( array $recipients )
$recipients array
hasNext() public method

Returns true only if there are more recipients to send to.

public bool hasNext ( )
nextRecipient() public method

Returns an array where the keys are the addresses of recipients and the values are the names. e.g. ('foo@bar' => 'Foo') or ('foo@bar' => NULL).

public array nextRecipient ( )