MediaWiki REL1_32
DoubleReplacer.php
Go to the documentation of this file.
1<?php
26class DoubleReplacer extends Replacer {
32 public function __construct( $from, $to, $index = 0 ) {
33 wfDeprecated( __METHOD__, '1.32' );
34 $this->from = $from;
35 $this->to = $to;
36 $this->index = $index;
37 }
38
43 public function replace( array $matches ) {
44 return str_replace( $this->from, $this->to, $matches[$this->index] );
45 }
46}
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Throws a warning that $function is deprecated.
Class to perform secondary replacement within each replacement string.
__construct( $from, $to, $index=0)
replace(array $matches)
Base class for "replacers", objects used in preg_replace_callback() and StringUtils::delimiterReplace...
Definition Replacer.php:27
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))