A header containing one or more email addresses and/or groups of addresses.
An address is separated by a comma, and each group separated by a semi-colon. The AddressHeader provides a complete list of all addresses referenced in a header including any addresses in groups, in addition to being able to access the groups separately if needed.
For full specifications, see {@link https://www.ietf.org/rfc/rfc2822.txt}
- author Zaahid Bateson
Methods |
public __construct(string $name, string $value, ?Psr\Log\LoggerInterface $logger = NULL, ?ZBateson |
public getAddresses() : array Returns all address parts in the header including any addresses that are in groups (lists).
|
public getEmail() : ?string Returns the first email address in the header.
|
public getGroups() : array Returns all group parts (lists) in the header.
|
public getPersonName() : ?string Returns the name associated with the first email address to complement getEmail() if one is set, or null if not.
|
public hasAddress(string $email) : bool Returns true if an address exists with the passed email address. Comparison is done case insensitively. |
Properties |
protected array $addresses = []
|
protected array $groups = []
|
Methods |
protected filterAndAssignToParts() : void Filters $this->allParts into the parts required by $this->parts and assignes it. The AbstractHeader::filterAndAssignToParts method filters out CommentParts. |
Methods |