Skip to content

Kirby 5.2.0

Tokenizer::token()

Scans the source string for a next token starting from the given position

Tokenizer::token() has been marked as unstable. It might be changed in a future Kirby major or minor release without being considered a breaking change. Use with caution.

Tokenizer::token(string $query, int $current): Kirby\Query\Parser\Token

Parameters

Name Type Default Description
$queryrequired string no default value
$currentrequired int no default value The current position in the source string

Return type

Kirby\Query\Parser\Token

Exceptions

Type Description
Exception If an unexpected character is encountered

Parent class

Kirby\Query\Parser\Tokenizer