class Tokens (View source)

Token utilities.

Methods

static bool
match(Token $token, array $pattern)

Checks if a pattern is a match for the specified token.

static TokensList
replaceTokens(TokensList|string|UtfString $list, array $find, array $replace)

No description

Details

static bool match(Token $token, array $pattern)

Checks if a pattern is a match for the specified token.

Parameters

Token $token the token to be matched
array $pattern the pattern to be matches

Return Value

bool

static TokensList replaceTokens(TokensList|string|UtfString $list, array $find, array $replace)

Parameters

TokensList|string|UtfString $list
array $find
array $replace

Return Value

TokensList