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(ZBateson Constructor overridden to include $partName parameter. |
Properties |
protected $partName = NULL
|
Methods |
protected getPartName() : string Returns the name of the part being parsed. This is always the lower-case name provided to the constructor, not the |
protected getSubConsumers() : array Overridden to return a CommentConsumer.
|
protected getTokenSeparators() : array Returns a whitespace separator (for filtering ignorable whitespace
|
protected isEndToken(string $token) : bool Returns true if the token matches (case-insensitively) any of the o by |
protected isStartToken(string $token) : bool Returns true if the passed token matches (case-insensitively) |
protected processParts(array $parts) : array Overridden to combine all part values into a single string and return it
|
Methods |