Consumes simple literal strings for parts of a Received header.
Starts consuming when the initialized $partName string is located, for instance when initialized with "FROM", will start consuming on " FROM" or "FROM ".
The consumer ends when any possible "Received" header part is found, namely on one of the following tokens: from, by, via, with, id, for, or when the start token for the date stamp is found, ';'.
The consumer allows comments in and around the consumer... although the Received header specification only allows them before a part, for example, technically speaking this is valid:
"FROM machine (host) (comment) BY machine"
However, this is not:
"FROM machine (host) BY machine WITH (comment) ESMTP"
The consumer will allow both.
- author Zaahid Bateson
Methods |
public __construct(Psr\Log\LoggerInterface $logger, ZBateson Constructor overridden to include $partName parameter. |
Properties |
protected $partName = NULL
|
Methods |
protected getTokenSeparators() : array Returns a whitespace separator (for filtering ignorable whitespace between parts), and a separator matching the current part name as set on $this->partName.
|
protected isEndToken(string $token) : bool Returns true if the token matches (case-insensitively) any of the following, with optional surrounding whitespace: o by o via o with o id o for o ; |
protected isStartToken(string $token) : bool Returns true if the passed token matches (case-insensitively) $this->getPartName() with optional whitespace surrounding it. |
protected processParts(array $parts) : array
|