MediaWiki REL1_32
|
Static Public Member Functions | |
static | doBlockLevels ( $text, $lineStart) |
Make lists from lines starting with ':', '*', '#', etc. | |
Public Attributes | |
const | COLON_STATE_CLOSETAG = 3 |
const | COLON_STATE_COMMENT = 5 |
const | COLON_STATE_COMMENTDASH = 6 |
const | COLON_STATE_COMMENTDASHDASH = 7 |
const | COLON_STATE_LC = 8 |
const | COLON_STATE_TAG = 1 |
const | COLON_STATE_TAGSLASH = 4 |
const | COLON_STATE_TAGSTART = 2 |
const | COLON_STATE_TEXT = 0 |
Private Member Functions | |
__construct ( $text, $lineStart) | |
Private constructor. | |
closeList ( $char) | |
Close the current list item identified by the prefix character. | |
closeParagraph () | |
If a pre or p is open, return the corresponding close tag and update the state. | |
execute () | |
Execute the pass. | |
findColonNoLinks ( $str, &$before, &$after) | |
Split up a string on ':', ignoring any occurrences inside tags to prevent illegal overlapping. | |
getCommon ( $st1, $st2) | |
getCommon() returns the length of the longest common substring of both arguments, starting at the beginning of both. | |
nextItem ( $char) | |
Close the current list item and open the next one. | |
openList ( $char) | |
Open the list item element identified by the prefix character. | |
Private Attributes | |
$DTopen = false | |
$inPre = false | |
$lastSection = '' | |
$lineStart | |
$text | |
Definition at line 25 of file BlockLevelPass.php.
|
private |
Private constructor.
Definition at line 58 of file BlockLevelPass.php.
References $lineStart, $text, and text.
|
private |
Close the current list item identified by the prefix character.
string | $char |
Definition at line 155 of file BlockLevelPass.php.
References $text.
Referenced by execute().
|
private |
If a pre or p is open, return the corresponding close tag and update the state.
If no tag is open, return an empty string.
Definition at line 68 of file BlockLevelPass.php.
Referenced by execute(), and openList().
|
static |
Make lists from lines starting with ':', '*', '#', etc.
string | $text | |
bool | $lineStart | Whether or not this is at the start of a line. |
Definition at line 50 of file BlockLevelPass.php.
References $lineStart, and $text.
Referenced by Parser\doBlockLevels().
|
private |
Execute the pass.
Definition at line 177 of file BlockLevelPass.php.
References $output, $t, $term, $text, as, closeList(), closeParagraph(), StringUtils\explode(), findColonNoLinks(), getCommon(), nextItem(), and openList().
|
private |
Split up a string on ':', ignoring any occurrences inside tags to prevent illegal overlapping.
string | $str | The string to split |
string | &$before | Set to everything before the ':' |
string | &$after | Set to everything after the ':' |
MWException |
Definition at line 429 of file BlockLevelPass.php.
References COLON_STATE_CLOSETAG, COLON_STATE_COMMENT, COLON_STATE_COMMENTDASH, COLON_STATE_COMMENTDASHDASH, COLON_STATE_LC, COLON_STATE_TAG, COLON_STATE_TAGSLASH, COLON_STATE_TAGSTART, COLON_STATE_TEXT, and wfDebug().
Referenced by execute().
|
private |
getCommon() returns the length of the longest common substring of both arguments, starting at the beginning of both.
string | $st1 | |
string | $st2 |
Definition at line 87 of file BlockLevelPass.php.
Referenced by execute().
|
private |
Close the current list item and open the next one.
string | $char |
Definition at line 130 of file BlockLevelPass.php.
Referenced by execute().
|
private |
Open the list item element identified by the prefix character.
string | $char |
Definition at line 105 of file BlockLevelPass.php.
References closeParagraph().
Referenced by execute().
|
private |
Definition at line 26 of file BlockLevelPass.php.
|
private |
Definition at line 27 of file BlockLevelPass.php.
|
private |
Definition at line 28 of file BlockLevelPass.php.
|
private |
Definition at line 29 of file BlockLevelPass.php.
Referenced by __construct(), and doBlockLevels().
|
private |
Definition at line 30 of file BlockLevelPass.php.
Referenced by __construct(), closeList(), doBlockLevels(), and execute().
const BlockLevelPass::COLON_STATE_CLOSETAG = 3 |
Definition at line 36 of file BlockLevelPass.php.
Referenced by findColonNoLinks().
const BlockLevelPass::COLON_STATE_COMMENT = 5 |
Definition at line 38 of file BlockLevelPass.php.
Referenced by findColonNoLinks().
const BlockLevelPass::COLON_STATE_COMMENTDASH = 6 |
Definition at line 39 of file BlockLevelPass.php.
Referenced by findColonNoLinks().
const BlockLevelPass::COLON_STATE_COMMENTDASHDASH = 7 |
Definition at line 40 of file BlockLevelPass.php.
Referenced by findColonNoLinks().
const BlockLevelPass::COLON_STATE_LC = 8 |
Definition at line 41 of file BlockLevelPass.php.
Referenced by findColonNoLinks().
const BlockLevelPass::COLON_STATE_TAG = 1 |
Definition at line 34 of file BlockLevelPass.php.
Referenced by findColonNoLinks().
const BlockLevelPass::COLON_STATE_TAGSLASH = 4 |
Definition at line 37 of file BlockLevelPass.php.
Referenced by findColonNoLinks().
const BlockLevelPass::COLON_STATE_TAGSTART = 2 |
Definition at line 35 of file BlockLevelPass.php.
Referenced by findColonNoLinks().
const BlockLevelPass::COLON_STATE_TEXT = 0 |
Definition at line 33 of file BlockLevelPass.php.
Referenced by findColonNoLinks().