MediaWiki  REL1_22
StripState Class Reference

List of all members.

Public Member Functions

 __construct ($prefix)
 addGeneral ($marker, $value)
 addNoWiki ($marker, $value)
 Add a nowiki strip item.
 getSubState ($text)
 Get a StripState object which is sufficient to unstrip the given text.
 killMarkers ($text)
 Remove any strip markers found in the given text.
 merge ($otherState, $texts)
 Merge another StripState object into this one.
 unstripBoth ($text)
 unstripGeneral ($text)
 unstripNoWiki ($text)

Public Attributes

 $tempMergePrefix
const UNSTRIP_RECURSION_LIMIT = 20

Protected Member Functions

 addItem ($type, $marker, $value)
 mergeCallback ($m)
 unstripCallback ($m)
 unstripType ($type, $text)

Protected Attributes

 $circularRefGuard
 $data
 $prefix
 $recursionLevel = 0
 $regex
 $tempType

Detailed Description

Todo:
document, briefly.

Definition at line 28 of file StripState.php.


Constructor & Destructor Documentation

StripState::__construct ( prefix)
Parameters:
$prefixstring

Definition at line 42 of file StripState.php.

References $prefix, array(), data, and Parser\MARKER_SUFFIX.


Member Function Documentation

StripState::addGeneral ( marker,
value 
)
Parameters:
$marker
$value

Definition at line 65 of file StripState.php.

References $value, and addItem().

StripState::addItem ( type,
marker,
value 
) [protected]
Exceptions:
MWException
Parameters:
$type
$marker
$value

Definition at line 75 of file StripState.php.

References $value, and data.

Referenced by addGeneral(), and addNoWiki().

StripState::addNoWiki ( marker,
value 
)

Add a nowiki strip item.

Parameters:
$marker
$value

Definition at line 57 of file StripState.php.

References $value, and addItem().

Get a StripState object which is sufficient to unstrip the given text.

It will contain the minimum subset of strip items necessary.

Parameters:
$textstring
Returns:
StripState

Definition at line 166 of file StripState.php.

References $key, data, and Parser\MARKER_SUFFIX.

Remove any strip markers found in the given text.

Parameters:
$textInput string
Returns:
string

Definition at line 232 of file StripState.php.

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.

Parameters:
$otherStateStripState
$textsArray
Returns:
Array

Definition at line 202 of file StripState.php.

References $key, $value, array(), as, data, and Parser\getRandomString().

StripState::mergeCallback ( m) [protected]
Parameters:
$m
Returns:
string

Definition at line 221 of file StripState.php.

References $key, and Parser\MARKER_SUFFIX.

Parameters:
$text
Returns:
mixed

Definition at line 103 of file StripState.php.

References unstripType().

StripState::unstripCallback ( m) [protected]
Parameters:
$marray
Returns:
array

Definition at line 133 of file StripState.php.

References $ret, data, unstripType(), and wfMessage().

Parameters:
$text
Returns:
mixed

Definition at line 87 of file StripState.php.

References unstripType().

Parameters:
$text
Returns:
mixed

Definition at line 95 of file StripState.php.

References unstripType().

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

Definition at line 114 of file StripState.php.

References array(), data, wfProfileIn(), and wfProfileOut().

Referenced by unstripBoth(), unstripCallback(), unstripGeneral(), and unstripNoWiki().


Member Data Documentation

StripState::$circularRefGuard [protected]

Definition at line 34 of file StripState.php.

StripState::$data [protected]

Definition at line 30 of file StripState.php.

StripState::$prefix [protected]

Definition at line 29 of file StripState.php.

Referenced by __construct().

StripState::$recursionLevel = 0 [protected]

Definition at line 35 of file StripState.php.

StripState::$regex [protected]

Definition at line 31 of file StripState.php.

StripState::$tempMergePrefix

Definition at line 33 of file StripState.php.

StripState::$tempType [protected]

Definition at line 33 of file StripState.php.

Definition at line 37 of file StripState.php.


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