MediaWiki  REL1_19
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

Protected Member Functions

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

Protected Attributes

 $data
 $prefix
 $regex
 $tempType

Detailed Description

Todo:
document, briefly.

Definition at line 7 of file StripState.php.


Constructor & Destructor Documentation

StripState::__construct ( prefix)
Parameters:
$prefixstring

Definition at line 17 of file StripState.php.

References $prefix, and Parser\MARKER_SUFFIX.


Member Function Documentation

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

Definition at line 39 of file StripState.php.

References addItem().

Here is the call graph for this function:

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

Definition at line 49 of file StripState.php.

Referenced by addGeneral(), and addNoWiki().

Here is the caller graph for this function:

StripState::addNoWiki ( marker,
value 
)

Add a nowiki strip item.

Parameters:
$marker
$value

Definition at line 31 of file StripState.php.

References addItem().

Here is the call graph for this function:

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

References Parser\MARKER_SUFFIX.

Remove any strip markers found in the given text.

Parameters:
$textInput string
Returns:
string

Definition at line 191 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 161 of file StripState.php.

References Parser\getRandomString().

Here is the call graph for this function:

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

Definition at line 180 of file StripState.php.

References Parser\MARKER_SUFFIX.

Parameters:
$text
Returns:
mixed

Definition at line 77 of file StripState.php.

References unstripType().

Here is the call graph for this function:

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

Definition at line 109 of file StripState.php.

Parameters:
$text
Returns:
mixed

Definition at line 61 of file StripState.php.

References unstripType().

Here is the call graph for this function:

Parameters:
$text
Returns:
mixed

Definition at line 69 of file StripState.php.

References unstripType().

Here is the call graph for this function:

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

Definition at line 88 of file StripState.php.

References wfProfileIn(), and wfProfileOut().

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

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

StripState::$data [protected]

Definition at line 9 of file StripState.php.

StripState::$prefix [protected]

Definition at line 8 of file StripState.php.

Referenced by __construct().

StripState::$regex [protected]

Definition at line 10 of file StripState.php.

StripState::$tempMergePrefix

Definition at line 12 of file StripState.php.

StripState::$tempType [protected]

Definition at line 12 of file StripState.php.


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