BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
StripState Class Reference

Public Member Functions

 __construct (Parser $parser=null, $options=[])
 
 addNoWiki ($marker, $value)
 
 addGeneral ($marker, $value)
 
 unstripGeneral ($text)
 
 unstripNoWiki ($text)
 
 unstripBoth ($text)
 
 getLimitReport ()
 
 getSubState ($text)
 
 merge ($otherState, $texts)
 
 killMarkers ($text)
 

Protected Member Functions

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

Protected Attributes

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

Detailed Description

Todo:
document, briefly.

Constructor & Destructor Documentation

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

Member Function Documentation

StripState::addGeneral (   $marker,
  $value 
)
Parameters
string$marker
string$value
StripState::addItem (   $type,
  $marker,
  $value 
)
protected
Exceptions
MWException
Parameters
string$type
string$marker
string$value
StripState::addNoWiki (   $marker,
  $value 
)

Add a nowiki strip item

Parameters
string$marker
string$value
StripState::getLimitReport ( )

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

StripState::getSubState (   $text)

Get a StripState object which is sufficient to unstrip the given text. It will contain the minimum subset of strip items necessary.

Deprecated:
since 1.31
Parameters
string$text
Returns
StripState
StripState::killMarkers (   $text)

Remove any strip markers found in the given text.

Parameters
string$text
Returns
string
StripState::merge (   $otherState,
  $texts 
)

Merge another StripState object into this one. The strip marker keys will not be preserved. The strings in the $texts array will have their strip markers rewritten, the resulting array of strings will be returned.

Deprecated:
since 1.31
Parameters
StripState$otherState
array$texts
Returns
array
StripState::unstripBoth (   $text)
Parameters
string$text
Returns
mixed
StripState::unstripGeneral (   $text)
Parameters
string$text
Returns
mixed
StripState::unstripNoWiki (   $text)
Parameters
string$text
Returns
mixed
StripState::unstripType (   $type,
  $text 
)
protected
Parameters
string$type
string$text
Returns
mixed

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