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(string|array $input = [])

No description

array
parse(string $s)

No description

append($val, int $position = null)

Appends simple token or string (will be parsed).

prepend($val)

Prepends simple token or string (will be parsed).

string|null
fetchWord()

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

array
fetchWords()

Reads single tokens delimited by colon from string.

reset()

No description

void
next()

Moves cursor to next token.

Details

at line 39
__construct(string|array $input = [])

No description

Parameters

string|array $input

at line 46
array parse(string $s)

No description

Parameters

string $s

Return Value

array

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

Appends simple token or string (will be parsed).

Parameters

$val
int $position

Return Value

MacroTokens

at line 85
MacroTokens prepend($val)

Prepends simple token or string (will be parsed).

Parameters

$val

Return Value

MacroTokens

at line 97
string|null fetchWord()

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

Return Value

string|null

at line 107
array fetchWords()

Reads single tokens delimited by colon from string.

Return Value

array

at line 123
TokenIterator reset()

No description

Return Value

TokenIterator

at line 130
protected void next()

Moves cursor to next token.

Return Value

void