Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
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: