MediaWiki 1.43.1
MediaWiki\Parser\StripState Class Reference
Collaboration diagram for MediaWiki\Parser\StripState:

Public Member Functions

 __construct (?Parser $parser=null, $options=[])
 
 addGeneral ( $marker, $value)
 
 addNoWiki ( $marker, $value)
 Add a nowiki strip item.
 
 getLimitReport ()
 Get an array of parameters to pass to ParserOutput::setLimitReportData()
 
 killMarkers ( $text)
 Remove any strip markers found in the given text.
 
 replaceNoWikis (string $text, callable $callback)
 
 unstripBoth ( $text)
 
 unstripGeneral ( $text)
 
 unstripNoWiki ( $text)
 

Protected Member Functions

 addItem ( $type, $marker, $value)
 
 unstripType ( $type, $text)
 

Protected Attributes

array $circularRefGuard
 
array[] $data
 
int $depth = 0
 
int $depthLimit = 20
 
int $expandSize = 0
 
int $highestDepth = 0
 
Parser $parser
 
string $regex
 
int $sizeLimit = 5_000_000
 

Detailed Description

Todo
document, briefly.
Stability: newable

Definition at line 34 of file StripState.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Parser\StripState::__construct ( ?Parser $parser = null,
$options = [] )
Stability: stable
to call
Parameters
Parser | null$parser
array$options

Definition at line 62 of file StripState.php.

References MediaWiki\Parser\StripState\$parser, and MediaWiki\Parser\Parser\MARKER_PREFIX.

Member Function Documentation

◆ addGeneral()

MediaWiki\Parser\StripState::addGeneral ( $marker,
$value )
Parameters
string$marker
string | Closure$value

Definition at line 92 of file StripState.php.

References MediaWiki\Parser\StripState\addItem().

◆ addItem()

MediaWiki\Parser\StripState::addItem ( $type,
$marker,
$value )
protected
Parameters
string$type
string$marker
string | Closure$value

Definition at line 104 of file StripState.php.

Referenced by MediaWiki\Parser\StripState\addGeneral(), and MediaWiki\Parser\StripState\addNoWiki().

◆ addNoWiki()

MediaWiki\Parser\StripState::addNoWiki ( $marker,
$value )

Add a nowiki strip item.

Parameters
string$marker
string | Closure$value

Definition at line 84 of file StripState.php.

References MediaWiki\Parser\StripState\addItem().

◆ getLimitReport()

MediaWiki\Parser\StripState::getLimitReport ( )

Get an array of parameters to pass to ParserOutput::setLimitReportData()

Access: internal
Should only be called by Parser
Returns
array

Definition at line 256 of file StripState.php.

◆ killMarkers()

MediaWiki\Parser\StripState::killMarkers ( $text)

Remove any strip markers found in the given text.

Parameters
string$text
Returns
string

Definition at line 279 of file StripState.php.

◆ replaceNoWikis()

MediaWiki\Parser\StripState::replaceNoWikis ( string $text,
callable $callback )
Parameters
string$text
callable$callback
Returns
string

Definition at line 133 of file StripState.php.

◆ unstripBoth()

MediaWiki\Parser\StripState::unstripBoth ( $text)
Parameters
string$text
Returns
mixed

Definition at line 165 of file StripState.php.

◆ unstripGeneral()

MediaWiki\Parser\StripState::unstripGeneral ( $text)
Parameters
string$text
Returns
mixed

Definition at line 116 of file StripState.php.

References MediaWiki\Parser\StripState\unstripType().

◆ unstripNoWiki()

MediaWiki\Parser\StripState::unstripNoWiki ( $text)
Parameters
string$text
Returns
mixed

Definition at line 124 of file StripState.php.

References MediaWiki\Parser\StripState\unstripType().

◆ unstripType()

MediaWiki\Parser\StripState::unstripType ( $type,
$text )
protected
Parameters
string$type
string$text
Returns
mixed

Definition at line 176 of file StripState.php.

Referenced by MediaWiki\Parser\StripState\unstripGeneral(), and MediaWiki\Parser\StripState\unstripNoWiki().

Member Data Documentation

◆ $circularRefGuard

array MediaWiki\Parser\StripState::$circularRefGuard
protected

Definition at line 43 of file StripState.php.

◆ $data

array [] MediaWiki\Parser\StripState::$data
protected

Definition at line 36 of file StripState.php.

◆ $depth

int MediaWiki\Parser\StripState::$depth = 0
protected

Definition at line 45 of file StripState.php.

◆ $depthLimit

int MediaWiki\Parser\StripState::$depthLimit = 20
protected

Definition at line 52 of file StripState.php.

◆ $expandSize

int MediaWiki\Parser\StripState::$expandSize = 0
protected

Definition at line 49 of file StripState.php.

◆ $highestDepth

int MediaWiki\Parser\StripState::$highestDepth = 0
protected

Definition at line 47 of file StripState.php.

◆ $parser

Parser MediaWiki\Parser\StripState::$parser
protected

Definition at line 40 of file StripState.php.

Referenced by MediaWiki\Parser\StripState\__construct().

◆ $regex

string MediaWiki\Parser\StripState::$regex
protected

Definition at line 38 of file StripState.php.

◆ $sizeLimit

int MediaWiki\Parser\StripState::$sizeLimit = 5_000_000
protected

Definition at line 54 of file StripState.php.


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