Documentation

Tokenizer
in package
implements TokenizerInterface

FinalYes

Convert EDI messages into tokens for parsing.

Table of Contents

Interfaces

TokenizerInterface
Convert EDI messages into tokens for parsing.

Properties

$char  : string
$characters  : CharactersInterface
$isEscaped  : bool
$message  : string
$position  : int
$string  : string

Methods

getTokens()  : iterable<string|int, Token>
Convert the passed message into tokens.
endOfMessage()  : bool
Check if we've reached the end of the message
extractStoredChars()  : string
Get the previously stored characters.
getNextChar()  : string
Get the next character from the message.
getNextToken()  : Token|null
Get the next token from the message.
isControlCharacter()  : bool
Check if the current character is a control character.
readNextChar()  : void
Read the next character from the message.
storeCurrentCharAndReadNext()  : void
Store the current character and read the next one from the message.

Properties

$char

private string $char = ""

The current character from the message we are dealing with.

$isEscaped

private bool $isEscaped = false

If the current character has been escaped.

$message

private string $message = ""

The message that we are tokenizing.

$position

private int $position = 0

The current position in the message.

$string

private string $string = ""

The stored characters for the next token.

Methods

endOfMessage()

Check if we've reached the end of the message

private endOfMessage() : bool
Return values
bool

extractStoredChars()

Get the previously stored characters.

private extractStoredChars() : string
Return values
string

getNextChar()

Get the next character from the message.

private getNextChar() : string
Return values
string

isControlCharacter()

Check if the current character is a control character.

private isControlCharacter() : bool
Return values
bool

readNextChar()

Read the next character from the message.

private readNextChar() : void

storeCurrentCharAndReadNext()

Store the current character and read the next one from the message.

private storeCurrentCharAndReadNext() : void
On this page

Search results