Documentation

Swift_Mailer_ArrayRecipientIterator
in package
implements Swift_Mailer_RecipientIterator

Wraps a standard PHP array in an iterator.

Tags
author

Chris Corbyn

Interfaces, Classes and Traits

Swift_Mailer_RecipientIterator
Provides an abstract way of specifying recipients for batch sending.

Table of Contents

$recipients  : array<string|int, mixed>
The list of recipients.
__construct()  : mixed
Create a new ArrayRecipientIterator from $recipients.
hasNext()  : bool
Returns true only if there are more recipients to send to.
nextRecipient()  : array<string|int, mixed>
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).

Properties

Methods

__construct()

Create a new ArrayRecipientIterator from $recipients.

public __construct(array<string|int, mixed> $recipients) : mixed
Parameters
$recipients : array<string|int, mixed>
Return values
mixed

hasNext()

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

public hasNext() : bool
Return values
bool

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).

public nextRecipient() : array<string|int, mixed>
Return values
array<string|int, mixed>

Search results