MediaWiki REL1_39
MediaWiki\User\TempUser\Pattern Class Reference

Helper for TempUserConfig representing string patterns with "$1" indicating variable substitution. More...

Public Member Functions

 __construct (string $debugName, string $pattern)
 
 generate ( $mappedSerial)
 Substitute the serial number into the pattern.
 
 isMatch (string $name)
 Does the pattern match the given name?
 

Detailed Description

Helper for TempUserConfig representing string patterns with "$1" indicating variable substitution.

Access: internal

Definition at line 11 of file Pattern.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\User\TempUser\Pattern::__construct ( string $debugName,
string $pattern )
Parameters
string$debugNameThe name of the pattern, for use in error messages
string$patternThe pattern itself

Definition at line 25 of file Pattern.php.

Member Function Documentation

◆ generate()

MediaWiki\User\TempUser\Pattern::generate ( $mappedSerial)

Substitute the serial number into the pattern.

Parameters
string$mappedSerial
Returns
string

Definition at line 54 of file Pattern.php.

◆ isMatch()

MediaWiki\User\TempUser\Pattern::isMatch ( string $name)

Does the pattern match the given name?

Parameters
string$name
Returns
bool

Definition at line 35 of file Pattern.php.


The documentation for this class was generated from the following file: