ImapParser
class ImapParser (View source)
Properties
| protected Token|null | $currentToken | The current token being parsed. |
Methods
Parse an untagged response.
Parse a continuation response.
Parse a tagged response.
Parses a bracket group of elements delimited by '[' and ']'.
Parses a single element, which might be a list or a simple token.
Advance to the next token from the tokenizer.
Details
__construct(ImapTokenizer $tokenizer)
Constructor.
protected UntaggedResponse
parseUntaggedResponse()
Parse an untagged response.
An untagged response begins with the '*' token. It may contain multiple elements, including lists and response codes.
protected ContinuationResponse
parseContinuationResponse()
Parse a continuation response.
A continuation response starts with a '+' token, indicating that the server expects additional data from the client.
protected TaggedResponse
parseTaggedResponse()
Parse a tagged response.
A tagged response begins with a tag (which is not '*' or '+') and is followed by a status and optional data.
protected ResponseCodeData
parseBracketGroup()
Parses a bracket group of elements delimited by '[' and ']'.
Bracket groups are used to represent response codes.
protected ListData
parseList()
Parses a list of elements delimited by '(' and ')'.
Lists are handled recursively, as a list may contain nested lists.
protected Data|Token|null
parseElement()
Parses a single element, which might be a list or a simple token.
protected void
advance()
Advance to the next token from the tokenizer.