MediaWiki
REL1_30
DoubleReplacer.php
Go to the documentation of this file.
1
<?php
24
class
DoubleReplacer
extends
Replacer
{
30
public
function
__construct
( $from, $to, $index = 0 ) {
31
$this->from = $from;
32
$this->to = $to;
33
$this->index = $index;
34
}
35
40
public
function
replace
( array
$matches
) {
41
return
str_replace( $this->from, $this->to,
$matches
[$this->index] );
42
}
43
}
$matches
$matches
Definition
NoLocalSettings.php:24
DoubleReplacer
Class to perform secondary replacement within each replacement string.
Definition
DoubleReplacer.php:24
DoubleReplacer\__construct
__construct( $from, $to, $index=0)
Definition
DoubleReplacer.php:30
DoubleReplacer\replace
replace(array $matches)
Definition
DoubleReplacer.php:40
Replacer
Base class for "replacers", objects used in preg_replace_callback() and StringUtils::delimiterReplace...
Definition
Replacer.php:25
includes
libs
replacers
DoubleReplacer.php
Generated on Mon Nov 25 2024 15:42:32 for MediaWiki by
1.10.0