Skip to content

Commit 674aab7

Browse files
committed
Added: new matching type for "a-zA-Z0-9_- " matching.
1 parent 14d3655 commit 674aab7

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/Processor.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,12 @@ public function matchParameterValue($match, $value)
334334
return true;
335335
}
336336

337+
// If a scalar is a ctype alnum with underscores, dashes and spaces.
338+
if ($matchType == 'ctype_special' && is_scalar($value)) {
339+
$value = str_replace([' ', '_', '-'], '', $value);
340+
return @ctype_alnum($value) === $matchValue;
341+
}
342+
337343
// If a scaler is a ctype digit.
338344
if ($matchType == 'ctype_digit' && is_scalar($value)) {
339345
return @ctype_digit($value) === $matchValue;

0 commit comments

Comments
 (0)