class MacroTokens extends TokenIterator

Macro tag tokenizer.

Constants

T_WHITESPACE

T_COMMENT

T_SYMBOL

T_NUMBER

T_VARIABLE

T_STRING

T_CAST

T_KEYWORD

T_CHAR

Properties

int $depth

Methods

__construct($input = [])

No description

parse($s)

No description

append($val, $position = null)

Appends simple token or string (will be parsed).

prepend($val)

Prepends simple token or string (will be parsed).

string
fetchWord()

Reads single token (optionally delimited by comma) from string.

array
fetchWords()

Reads single tokens delimited by colon from string.

reset()

No description

next()

Moves cursor to next token.

Details

at line 36
__construct($input = [])

No description

Parameters

$input

at line 43
parse($s)

No description

Parameters

$s

at line 64
MacroTokens append($val, $position = null)

Appends simple token or string (will be parsed).

Parameters

$val
$position

Return Value

MacroTokens

at line 82
MacroTokens prepend($val)

Prepends simple token or string (will be parsed).

Parameters

$val

Return Value

MacroTokens

at line 95
string fetchWord()

Reads single token (optionally delimited by comma) from string.

Return Value

string

at line 106
array fetchWords()

Reads single tokens delimited by colon from string.

Return Value

array

at line 122
TokenIterator reset()

No description

Return Value

TokenIterator

at line 129
protected next()

Moves cursor to next token.