MediaWiki  1.29.1
TitleBlacklistEntry Class Reference

Represents a title blacklist entry. More...

Public Member Functions

 getCustomMessage ()
 
 getErrorMessage ( $operation)
 Return the error message name for the blacklist entry. More...
 
 getFormatVersion ()
 
 getParams ()
 
 getRaw ()
 
 getRegex ()
 
 matches ( $title, $action)
 Check whether a user can perform the specified action on the specified Title. More...
 
 setFormatVersion ( $v)
 Set the format version. More...
 

Static Public Member Functions

static newFromString ( $line, $source)
 Create a new TitleBlacklistEntry from a line of text. More...
 

Public Attributes

 $mFormatVersion
 Entry format version. More...
 
 $mParams
 Parameters for this entry. More...
 
 $mRegex
 Regular expression to match. More...
 
 $mSource
 Source of this entry. More...
 

Private Member Functions

 __construct ( $regex, $params, $raw, $source)
 Construct a new TitleBlacklistEntry. More...
 
 filtersNewAccounts ()
 Returns whether this entry is capable of filtering new accounts. More...
 

Private Attributes

 $mRaw
 Raw line. More...
 

Detailed Description

Represents a title blacklist entry.

Definition at line 333 of file TitleBlacklist.list.php.

Member Function Documentation

◆ __construct()

TitleBlacklistEntry::__construct (   $regex,
  $params,
  $raw,
  $source 
)
private

Construct a new TitleBlacklistEntry.

Parameters
$regexstring Regular expression to match
$paramsarray Parameters for this entry
$rawstring Raw contents of this line

Definition at line 348 of file TitleBlacklist.list.php.

References $params, $source, and TitleBlacklist::VERSION.

◆ filtersNewAccounts()

TitleBlacklistEntry::filtersNewAccounts ( )
private

Returns whether this entry is capable of filtering new accounts.

Definition at line 359 of file TitleBlacklist.list.php.

References global.

Referenced by matches().

◆ getCustomMessage()

TitleBlacklistEntry::getCustomMessage ( )
Returns
string Custom message for this entry

Definition at line 543 of file TitleBlacklist.list.php.

Referenced by getErrorMessage().

◆ getErrorMessage()

TitleBlacklistEntry::getErrorMessage (   $operation)

Return the error message name for the blacklist entry.

Parameters
$operationstring Operation name (as in titleblacklist-forbidden message name)
Returns
string The error message name

Definition at line 566 of file TitleBlacklist.list.php.

References getCustomMessage().

◆ getFormatVersion()

TitleBlacklistEntry::getFormatVersion ( )
Returns
string The format version

Definition at line 550 of file TitleBlacklist.list.php.

References $mFormatVersion.

◆ getParams()

TitleBlacklistEntry::getParams ( )
Returns
array This entry's parameters

Definition at line 536 of file TitleBlacklist.list.php.

References $mParams.

◆ getRaw()

TitleBlacklistEntry::getRaw ( )
Returns
string This entry's raw line

Definition at line 529 of file TitleBlacklist.list.php.

References $mRaw.

◆ getRegex()

TitleBlacklistEntry::getRegex ( )
Returns
string This entry's regular expression

Definition at line 522 of file TitleBlacklist.list.php.

References $mRegex.

◆ matches()

TitleBlacklistEntry::matches (   $title,
  $action 
)

Check whether a user can perform the specified action on the specified Title.

Parameters
string$titleTitle to check
string$actionAction to check
Returns
bool TRUE if the the regex matches the title, and is not overridden else false if it doesn't match (or was overridden)

Definition at line 386 of file TitleBlacklist.list.php.

References $cache, $title, filtersNewAccounts(), ObjectCache::getMainWANInstance(), list, use, wfDebugLog(), wfRestoreWarnings(), and wfSuppressWarnings().

◆ newFromString()

static TitleBlacklistEntry::newFromString (   $line,
  $source 
)
static

Create a new TitleBlacklistEntry from a line of text.

Parameters
$lineString containing a line of blacklist text
Returns
TitleBlacklistEntry

Definition at line 452 of file TitleBlacklist.list.php.

References $line, $matches, $opt, $options, $source, $wgParser, array(), as, global, list, CoreParserFunctions::ns(), and wfMessage().

Referenced by TitleBlacklist::parseBlacklist().

◆ setFormatVersion()

TitleBlacklistEntry::setFormatVersion (   $v)

Set the format version.

Parameters
$vstring New version to set

Definition at line 557 of file TitleBlacklist.list.php.

Member Data Documentation

◆ $mFormatVersion

TitleBlacklistEntry::$mFormatVersion

Entry format version.

Definition at line 335 of file TitleBlacklist.list.php.

Referenced by getFormatVersion().

◆ $mParams

TitleBlacklistEntry::$mParams

Parameters for this entry.

Definition at line 335 of file TitleBlacklist.list.php.

Referenced by getParams().

◆ $mRaw

TitleBlacklistEntry::$mRaw
private

Raw line.

Definition at line 335 of file TitleBlacklist.list.php.

Referenced by getRaw().

◆ $mRegex

TitleBlacklistEntry::$mRegex

Regular expression to match.

Definition at line 335 of file TitleBlacklist.list.php.

Referenced by getRegex().

◆ $mSource

TitleBlacklistEntry::$mSource

Source of this entry.

Definition at line 335 of file TitleBlacklist.list.php.


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