MediaWiki  1.32.5
RegexlikeReplacer Class Reference

Class to replace regex matches with a string similar to that used in preg_replace() More...

Inheritance diagram for RegexlikeReplacer:
Collaboration diagram for RegexlikeReplacer:

Public Member Functions

 __construct ( $r)
 
 replace (array $matches)
 
- Public Member Functions inherited from Replacer
 cb ()
 

Private Attributes

 $r
 

Detailed Description

Class to replace regex matches with a string similar to that used in preg_replace()

Deprecated:
since 1.32, use a Closure instead

Definition at line 26 of file RegexlikeReplacer.php.

Constructor & Destructor Documentation

◆ __construct()

RegexlikeReplacer::__construct (   $r)
Parameters
string$r

Definition at line 32 of file RegexlikeReplacer.php.

References $r, and wfDeprecated().

Member Function Documentation

◆ replace()

RegexlikeReplacer::replace ( array  $matches)
Parameters
array$matches
Returns
string

Reimplemented from Replacer.

Definition at line 41 of file RegexlikeReplacer.php.

References $matches, and as.

Member Data Documentation

◆ $r

RegexlikeReplacer::$r
private

Definition at line 27 of file RegexlikeReplacer.php.

Referenced by __construct().


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