Parses a single group of addresses (as a named-group part of an address header).
Finds addresses using its AddressConsumerService sub-consumer separated by commas, and ends processing once a semi-colon is found.
Prior to returning to its calling client, AddressGroupConsumerService constructs a single Part\AddressGroupPart object filling it with all located addresses, and returns it.
The AddressGroupConsumerService extends AddressBaseConsumerService to define start/end tokens, token separators, and construct a Part\AddressGroupPart to return.
- author Zaahid Bateson
Methods |
public __construct(Psr\Log\LoggerInterface $logger, ZBateson |
public getTokenSeparators() : array Overridden to return patterns matching the beginning and end markers of a group address: colon and semi-colon (":" and ";") characters.
|
public setAddressConsumerService(ZBateson Needs to be called in AddressConsumerService's constructor to avoid a circular dependency. |
Properties |
Methods |
protected isEndToken(string $token) : bool Returns true if the passed token is a semi-colon. |
protected isStartToken(string $token) : bool Returns true if the passed token is a colon. |
protected parseTokensIntoParts(Iterator $tokens) : array Overridden to always call processParts even for an empty set of addresses, since a group could be empty.
|
protected processParts(array $parts) : array Performs post-processing on parsed parts. Returns an array with a single {@see \AddressGroupPart} element with all email addresses from this and any sub-groups.
|