protected function getPartForToken($token, $isLiteral)
    {
        if ($isLiteral) {
            return $this->partFactory->newLiteralPart($token);
        }
        return $this->partFactory->newToken($token);
    }
protected function getPartForToken($token, $isLiteral)
    {
        if ($isLiteral) {
            return $this->partFactory->newLiteralPart($token);
        }
        return $this->partFactory->newToken($token);
    }
protected function getPartForToken ( $ token , $ isLiteral ) { if ( $ isLiteral ) { return $ this -> partFactory -> newLiteralPart ( $ token ) ; } return $ this -> partFactory -> newToken ( $ token ) ; }
Creates and returns a \ZBateson\MailMimeParser\Header\Part\Token out of
the passed string token and returns it, unless the token is an escaped
literal, in which case a LiteralPart is returned.

@param string $token
@param bool $isLiteral
@return \ZBateson\MailMimeParser\Header\Part\HeaderPart
Creates and returns a \ ZBateson \ MailMimeParser \ Header \ Part \ Token out of the passed string token and returns it unless the token is an escaped literal in which case a LiteralPart is returned .