Class AddressList
An address list.
<?php use ICanBoogie\Mailer\AddressList; $list = new AddressList; $list[] = "olivier.laviale@gmail.com"; # or $list["olivier.laviale@gmail.com"] = true; # or, with a name $list["olivier.laviale@gmail.com"] = "Olivier Laviale"; # Creating a collection from an array $list = new AddressList([ 'person1@example.com', 'person2@example.org', 'person3@example.net' => 'Person 3 Name', 'person4@example.org', 'person5@example.net' => 'Person 5 Name' ]); isset($list['person1@example.com']); // true # remove mailbox unset($list['person1@example.com']); isset($list['person1@example.com']); // false
- ICanBoogie\Mailer\AddressList implements ArrayAccess, IteratorAggregate
Direct known subclasses
Indirect known subclasses
ICanBoogie\Mailer\Header\Bcc
,
ICanBoogie\Mailer\Header\Cc
,
ICanBoogie\Mailer\Header\From
,
ICanBoogie\Mailer\Header\To
Namespace: ICanBoogie\Mailer
See: http://tools.ietf.org/html/rfc5322#section-3.4
Located at AddressList.php
See: http://tools.ietf.org/html/rfc5322#section-3.4
Located at AddressList.php
Methods summary
public static
from( string|array|ICanBoogie\Mailer\AddressList
$address_list
)
: ICanBoogie\Mailer\AddressList
Creates a ICanBoogie\Mailer\AddressList
instance from the provided source.
public static
parse( string $address_list
)
: array[string]string
Parses an address-list string and returns an array of mailbox/display-name pairs.
public static
escape_display_name( string $display_name
)
: string
Escapes the specified display name according to the specification.
public
__construct( array $address_list
= array() )
Initializes the ICanBoogie\Mailer\AddressList::$address_list
property.