protected function parseTokensIntoParts(Iterator $tokens)
    {
        $parts = [];
        while ($tokens->valid() && !$this->isEndToken($tokens->current())) {
            $parts = array_merge($parts, $this->getTokenParts($tokens));
            $this->advanceToNextToken($tokens, false);
        }
        return $this->processParts($parts);
    }
protected function parseTokensIntoParts(Iterator $tokens)
    {
        $parts = [];
        while ($tokens->valid() && !$this->isEndToken($tokens->current())) {
            $parts = array_merge($parts, $this->getTokenParts($tokens));
            $this->advanceToNextToken($tokens, false);
        }
        return $this->processParts($parts);
    }
protected function parseTokensIntoParts ( Iterator $ tokens ) { $ parts = [ ] ; while ( $ tokens -> valid ( ) && ! $ this -> isEndToken ( $ tokens -> current ( ) ) ) { $ parts = array_merge ( $ parts , $ this -> getTokenParts ( $ tokens ) ) ; $ this -> advanceToNextToken ( $ tokens , false ) ; } return $ this -> processParts ( $ parts ) ; }
Iterates over the passed token Iterator and returns an array of parsed
\ZBateson\MailMimeParser\Header\Part\HeaderPart objects.

The method checks each token to see if the token matches a sub-consumer's
start token, or if it matches the current consumer's end token to stop
processing.

If a sub-consumer's start token is matched, the sub-consumer is invoked
and its returned parts are merged to the current consumer's header parts.

After all tokens are read and an array of Header\Parts are constructed,
the array is passed to AbstractConsumer::processParts for any final
processing.

@param Iterator $tokens an iterator over a string of tokens
@return \ZBateson\MailMimeParser\Header\Part\HeaderPart[] an array of
parsed parts
Iterates over the passed token Iterator and returns an array of parsed \ ZBateson \ MailMimeParser \ Header \ Part \ HeaderPart objects .