MediaWiki REL1_40
|
Helper for TempUserConfig representing string patterns with "$1" indicating variable substitution. More...
Public Member Functions | |
__construct (string $debugName, string $pattern) | |
buildLike (ISQLPlatform $db) | |
Convert the pattern to an SQL like clause. | |
extract (string $name) | |
Extract the part of the string matching $1, or null if there is no match. | |
generate ( $mappedSerial) | |
Substitute the serial number into the pattern. | |
isMatch (string $name) | |
Does the pattern match the given name? | |
Helper for TempUserConfig representing string patterns with "$1" indicating variable substitution.
Definition at line 13 of file Pattern.php.
MediaWiki\User\TempUser\Pattern::__construct | ( | string | $debugName, |
string | $pattern ) |
string | $debugName | The name of the pattern, for use in error messages |
string | $pattern | The pattern itself |
Definition at line 27 of file Pattern.php.
MediaWiki\User\TempUser\Pattern::buildLike | ( | ISQLPlatform | $db | ) |
Convert the pattern to an SQL like clause.
ISQLPlatform | $db |
Definition at line 67 of file Pattern.php.
References Wikimedia\Rdbms\Platform\ISQLPlatform\anyString(), and Wikimedia\Rdbms\Platform\ISQLPlatform\buildLike().
MediaWiki\User\TempUser\Pattern::extract | ( | string | $name | ) |
Extract the part of the string matching $1, or null if there is no match.
string | $name |
Definition at line 82 of file Pattern.php.
References MediaWiki\User\TempUser\Pattern\isMatch().
MediaWiki\User\TempUser\Pattern::generate | ( | $mappedSerial | ) |
Substitute the serial number into the pattern.
string | $mappedSerial |
Definition at line 56 of file Pattern.php.
MediaWiki\User\TempUser\Pattern::isMatch | ( | string | $name | ) |
Does the pattern match the given name?
string | $name |
Definition at line 37 of file Pattern.php.
Referenced by MediaWiki\User\TempUser\Pattern\extract().