Index

GroupDomain

MMO\core\helpers · 1 symbol · generated 30 Sep 2026

class

GroupDomain

Tokenizer.php:823

A generic group domain delimited by two ALREADY-REGISTERED tokens (referenced by their id, e.g. two multi-character delimiters, or two entries from a shared token list) -- unlike aGroupDomain, which is always a single start/end character pair specific to one subclass.

class MMO\core\helpers\GroupDomain extends MMO\core\helpers\TokenDomain
Namespace
MMO\core\helpers
Extends
TokenDomain
new GroupDomain(['{{' => 1, '}}' => 2], 1, 2); // recognizes {{...}}

Index

endID
escape
startID
close($tokenizer)Closes on the (unescaped, if applicable) end delimiter.
debugName()
open($tokenizer)Opens on the (unescaped, if applicable) start delimiter.
__construct($tokens, $startID, $endID, $escape)

Properties3

endID

protected int $endID
Type
int

startID

protected int $startID
Type
int

Methods4

close($tokenizer)

Tokenizer.php:855

Closes on the (unescaped, if applicable) end delimiter.

function close(MMO\core\helpers\Tokenizer $tokenizer): ?MMO\core\helpers\Token
$tokenizerTokenizer
returnsnull | Token

open($tokenizer)

Tokenizer.php:849

Opens on the (unescaped, if applicable) start delimiter.

function open(MMO\core\helpers\Tokenizer $tokenizer): ?MMO\core\helpers\Token
$tokenizerTokenizer
returnsnull | Token

__construct($tokens, $startID, $endID, $escape)

Tokenizer.php:835
function __construct(array $tokens, int $startID, int $endID, ?string $escape = null)
$tokensarraymust include entries for $startID and $endID (plus anything else allowed inside)
$startIDintthe id (within $tokens) of the opening delimiter
$endIDintthe id (within $tokens) of the closing delimiter
$escape = nullnull | stringthe escape character, or null to disable escaping
throwsif $startID or $endID isn't actually present in $tokens
Inherited members (11)
PropertiesDeclared byDescription
maskTokenDomain
tokensTokenDomainarray<id: string>
MethodsDeclared byDescription
addChar($char)TokenDomainRegister a single-character token (id auto-derived from the character's ord() value).
addDomains($domains)TokenDomainRegister one or more nested domains (their open is checked on every Tokenizer::next call while this domain is active).
addToken($id, $token)TokenDomainRegister a single multi-character token.
addTokens($tokens)TokenDomainRegister several tokens/domains at once.
getAllowedTokens()TokenDomain
getMask()TokenDomain
removeToken($token)TokenDomain
setTokens($tokens)TokenDomainReplace every registered token/domain with $tokens.
updateMask()TokenDomainRecompute getMask from the current token/domain list.