Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
Tokenizer Class Reference

A tokenizer class. More...

Public Member Functions

 __construct (StreamReader $streamReader)
 Tokenizer constructor.
 
 clearStack ()
 Clear the token stack.
 
 getNextToken ()
 Get next token.
 
 getStreamReader ()
 Get the stream reader instance.
 
 leapWhiteSpaces ()
 Leap white spaces.
 
 pushStack ($token)
 Push a token onto the stack.
 

Protected Attributes

string[] $stack = []
 A token stack.
 
StreamReader $streamReader
 

Detailed Description

A tokenizer class.

Constructor & Destructor Documentation

◆ __construct()

Tokenizer::__construct ( StreamReader $streamReader)

Tokenizer constructor.

Parameters
StreamReader$streamReader

Member Function Documentation

◆ getNextToken()

Tokenizer::getNextToken ( )

Get next token.

Return values
bool|string

◆ getStreamReader()

Tokenizer::getStreamReader ( )

Get the stream reader instance.

Return values
StreamReader

◆ leapWhiteSpaces()

Tokenizer::leapWhiteSpaces ( )

Leap white spaces.

Return values
boolean

◆ pushStack()

Tokenizer::pushStack ( $token)

Push a token onto the stack.

Parameters
string$token

The documentation for this class was generated from the following file: