MediaWiki REL1_41
StripState Class Reference

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

 $circularRefGuard
 
 $data
 
 $depth = 0
 
 $depthLimit = 20
 
 $expandSize = 0
 
 $highestDepth = 0
 
 $parser
 
 $regex
 
 $sizeLimit = 5000000
 

Detailed Description

Todo
document, briefly.
Stability: newable

Definition at line 29 of file StripState.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 49 of file StripState.php.

References $parser, and Parser\MARKER_PREFIX.

Member Function Documentation

◆ addGeneral()

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

Definition at line 79 of file StripState.php.

References addItem().

◆ addItem()

StripState::addItem ( $type,
$marker,
$value )
protected
Parameters
string$type
-taint$typenone
string$marker
-taint$markernone
string | Closure$value
-taint$valueexec_html

Definition at line 91 of file StripState.php.

Referenced by addGeneral(), and addNoWiki().

◆ addNoWiki()

StripState::addNoWiki ( $marker,
$value )

Add a nowiki strip item.

Parameters
string$marker
string | Closure$value

Definition at line 71 of file StripState.php.

References addItem().

◆ getLimitReport()

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 243 of file StripState.php.

◆ killMarkers()

StripState::killMarkers ( $text)

Remove any strip markers found in the given text.

Parameters
string$text
Returns
string

Definition at line 266 of file StripState.php.

◆ replaceNoWikis()

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

Definition at line 120 of file StripState.php.

◆ unstripBoth()

StripState::unstripBoth ( $text)
Parameters
string$text
Returns
mixed

Definition at line 152 of file StripState.php.

◆ unstripGeneral()

StripState::unstripGeneral ( $text)
Parameters
string$text
Returns
mixed

Definition at line 103 of file StripState.php.

References unstripType().

◆ unstripNoWiki()

StripState::unstripNoWiki ( $text)
Parameters
string$text
Returns
mixed

Definition at line 111 of file StripState.php.

References unstripType().

◆ unstripType()

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

Definition at line 163 of file StripState.php.

Referenced by unstripGeneral(), and unstripNoWiki().

Member Data Documentation

◆ $circularRefGuard

StripState::$circularRefGuard
protected

Definition at line 35 of file StripState.php.

◆ $data

StripState::$data
protected

Definition at line 30 of file StripState.php.

◆ $depth

StripState::$depth = 0
protected

Definition at line 36 of file StripState.php.

◆ $depthLimit

StripState::$depthLimit = 20
protected

Definition at line 40 of file StripState.php.

◆ $expandSize

StripState::$expandSize = 0
protected

Definition at line 38 of file StripState.php.

◆ $highestDepth

StripState::$highestDepth = 0
protected

Definition at line 37 of file StripState.php.

◆ $parser

StripState::$parser
protected

Definition at line 33 of file StripState.php.

Referenced by __construct().

◆ $regex

StripState::$regex
protected

Definition at line 31 of file StripState.php.

◆ $sizeLimit

StripState::$sizeLimit = 5000000
protected

Definition at line 41 of file StripState.php.


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