MediaWiki REL1_34
ReplaceTextSearch Class Reference

Static Public Member Functions

static categoryCondition ( $category, &$tables, &$conds)
 
static doSearchQuery ( $search, $namespaces, $category, $prefix, $use_regex=false)
 
static getMatchingTitles ( $str, $namespaces, $category, $prefix, $use_regex=false)
 
static getReplacedText ( $text, $search, $replacement, $regex)
 Do a replacement on a string.
 
static getReplacedTitle (Title $title, $search, $replacement, $regex)
 Do a replacement on a title.
 
static prefixCondition ( $prefix, &$conds)
 
static regexCond ( $dbr, $column, $regex)
 

Detailed Description

Definition at line 24 of file ReplaceTextSearch.php.

Member Function Documentation

◆ categoryCondition()

static ReplaceTextSearch::categoryCondition ( $category,
& $tables,
& $conds )
static
Parameters
string$category
array&$tables
array&$conds

Definition at line 72 of file ReplaceTextSearch.php.

Referenced by doSearchQuery(), and getMatchingTitles().

◆ doSearchQuery()

static ReplaceTextSearch::doSearchQuery ( $search,
$namespaces,
$category,
$prefix,
$use_regex = false )
static
Parameters
string$search
array$namespaces
string$category
string$prefix
bool$use_regex
Returns
IResultWrapper Resulting rows

Definition at line 34 of file ReplaceTextSearch.php.

References $dbr, categoryCondition(), DB_REPLICA, prefixCondition(), regexCond(), and wfGetDB().

Referenced by ReplaceAll\execute(), SpecialReplaceText\getAnyWarningMessageBeforeReplace(), and SpecialReplaceText\getTitlesForEditingWithContext().

◆ getMatchingTitles()

static ReplaceTextSearch::getMatchingTitles ( $str,
$namespaces,
$category,
$prefix,
$use_regex = false )
static
Parameters
string$str
array$namespaces
string$category
string$prefix
bool$use_regex
Returns
IResultWrapper Resulting rows

Definition at line 122 of file ReplaceTextSearch.php.

References $dbr, $sort, categoryCondition(), DB_REPLICA, prefixCondition(), regexCond(), and wfGetDB().

Referenced by ReplaceAll\execute(), SpecialReplaceText\getAnyWarningMessageBeforeReplace(), and SpecialReplaceText\getTitlesForMoveAndUnmoveableTitles().

◆ getReplacedText()

static ReplaceTextSearch::getReplacedText ( $text,
$search,
$replacement,
$regex )
static

Do a replacement on a string.

Parameters
string$text
string$search
string$replacement
bool$regex
Returns
string

Definition at line 161 of file ReplaceTextSearch.php.

Referenced by getReplacedTitle().

◆ getReplacedTitle()

static ReplaceTextSearch::getReplacedTitle ( Title $title,
$search,
$replacement,
$regex )
static

Do a replacement on a title.

Parameters
Title$title
string$search
string$replacement
bool$regex
Returns
Title|null

Definition at line 178 of file ReplaceTextSearch.php.

References $title, and getReplacedText().

Referenced by SpecialReplaceText\getTitlesForMoveAndUnmoveableTitles(), ReplaceAll\listTitles(), and ReplaceTextJob\run().

◆ prefixCondition()

static ReplaceTextSearch::prefixCondition ( $prefix,
& $conds )
static
Parameters
string$prefix
array&$conds

Definition at line 85 of file ReplaceTextSearch.php.

References $dbr, $title, DB_REPLICA, and wfGetDB().

Referenced by doSearchQuery(), and getMatchingTitles().

◆ regexCond()

static ReplaceTextSearch::regexCond ( $dbr,
$column,
$regex )
static
Parameters
IDatabase$dbr
string$column
string$regex
Returns
string query condition for regex

Definition at line 105 of file ReplaceTextSearch.php.

References $dbr.

Referenced by doSearchQuery(), and getMatchingTitles().


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