private static function tokenizeValue($value)
{
preg_match_all(self::$valueWildcardRegex, $value, $matches);
$tokens = [];
foreach ($matches[0] as $valuePart) {
if ($valuePart === '*') {
$tokens[] = ['type' => self::VALUE_WILDCARD];
} else {
if ($valuePart === '\\*') {
$tokens[] = ['type' => self::VALUE_STRING, 'value' => '*'];
} else {
if ($valuePart === '\\\\') {
$tokens[] = ['type' => self::VALUE_STRING, 'value' => '\\'];
} else {
$tokens[] = ['type' => self::VALUE_STRING, 'value' => $valuePart];
}
}
}
}
return $tokens;
}