Methods
Add an address to the list from any valid string format, such as
- "ZF Dev" <dev@zf.com>
- dev@zf.com
addFromString(string $address) : \Zend\Mail\AddressList
Parameters
$address
string
Exceptions
Returns
Add many addresses at once
addMany(array $addresses) : \Zend\Mail\AddressList
If an email key is provided, it will be used as the email, and the value
as the name. Otherwise, the value is passed as the sole argument to add(),
and, as such, can be either email strings or Address\AddressInterface objects.
Parameters
$addresses
array
Exceptions
Returns
Return count of addresses
count() : int
Delete an address from the list
delete(string $email) : bool
Parameters
$email
string
Returns
bool
Does the email exist in this list?
has(string $email) : bool
Parameters
$email
string
Returns
bool
Return key of current item of iteration
key() : string
Move to next item
next() : mixed
Returns
mixed
the addresses value in the next place that's pointed to by the internal array pointer, or false if there are no more elements.
Rewind iterator
rewind() : mixed
Returns
mixed
the value of the first addresses element, or false if the addresses is empty.
Is the current item of iteration valid?
valid() : bool
Create an address object
createAddress(string $email, string | null $name) : \Zend\Mail\Address
Parameters
$email
string
$name
stringnull
Returns
Properties
List of Address objects we're managing
$addresses : array