[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
(no description)
File Size: | 921 lines (26 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
ExtParserFunctions:: (33 methods):
clearState()
registerClearHook()
getMarkerRegex()
killMarkers()
getExprParser()
expr()
ifexpr()
ifexprObj()
ifObj()
ifeqObj()
iferror()
iferrorObj()
switchObj()
rel2abs()
ifexistCommon()
ifexistObj()
timeCommon()
time()
timeObj()
localTime()
localTimeObj()
titleparts()
checkLength()
tooLongError()
runLen()
runPos()
runRPos()
runSub()
runCount()
runReplace()
runExplode()
runUrlDecode()
decodeTrimExpand()
Class: ExtParserFunctions - X-Ref
clearState( $parser ) X-Ref |
param: $parser Parser return: bool |
registerClearHook() X-Ref |
Register ParserClearState hook. We defer this until needed to avoid the loading of the code of this file when no parser function is actually called. |
getMarkerRegex( $parser ) X-Ref |
Get the marker regex. Cached. param: $parser Parser return: |
killMarkers( $parser, $text ) X-Ref |
param: $parser Parser param: $text string return: string |
getExprParser() X-Ref |
return: ExprParser |
expr( $parser, $expr = '' ) X-Ref |
param: $parser Parser param: $expr string return: string |
ifexpr( $parser, $expr = '', $then = '', $else = '' ) X-Ref |
param: $parser Parser param: $expr string param: $then string param: $else string return: string |
ifexprObj( $parser, $frame, $args ) X-Ref |
param: $parser Parser param: $frame PPFrame param: $args array return: string |
ifObj( $parser, $frame, $args ) X-Ref |
param: $parser Parser param: $frame PPFrame param: $args array return: string |
ifeqObj( $parser, $frame, $args ) X-Ref |
param: $parser Parser param: $frame PPFrame param: $args array return: string |
iferror( $parser, $test = '', $then = '', $else = false ) X-Ref |
param: $parser Parser param: $test string param: $then string param: $else bool return: bool|string |
iferrorObj( $parser, $frame, $args ) X-Ref |
param: $parser Parser param: $frame PPFrame param: $args array return: string |
switchObj( $parser, $frame, $args ) X-Ref |
param: $parser Parser param: $frame PPFrame param: $args return: string |
rel2abs( $parser , $to = '' , $from = '' ) X-Ref |
Returns the absolute path to a subpage, relative to the current article title. Treats titles as slash-separated paths. Following subpage link syntax instead of standard path syntax, an initial slash is treated as a relative path, and vice versa. param: $parser Parser param: $to string param: $from string return: string |
ifexistCommon( $parser, $frame, $titletext = '', $then = '', $else = '' ) X-Ref |
param: $parser Parser param: $frame PPFrame param: $titletext string param: $then string param: $else string return: string |
ifexistObj( $parser, $frame, $args ) X-Ref |
param: $parser Parser param: $frame PPFrame param: $args array return: string |
timeCommon( $parser, $frame = null, $format = '', $date = '', $language = '', $local = false ) X-Ref |
param: $parser Parser param: $frame PPFrame param: $format string param: $date string param: $language string param: $local string|bool return: string |
time( $parser, $format = '', $date = '', $language = '', $local = false ) X-Ref |
param: $parser Parser param: $format string param: $date string param: $language string param: $local string|bool return: string |
timeObj( $parser, $frame, $args ) X-Ref |
param: $parser Parser param: $frame PPFrame param: $args array return: string |
localTime( $parser, $format = '', $date = '', $language = '' ) X-Ref |
param: $parser Parser param: $format string param: $date string param: $language string return: string |
localTimeObj( $parser, $frame, $args ) X-Ref |
param: $parser Parser param: $frame PPFrame param: $args array return: string |
titleparts( $parser, $title = '', $parts = 0, $offset = 0 ) X-Ref |
Obtain a specified number of slash-separated parts of a title, e.g. {{#titleparts:Hello/World|1}} => "Hello" param: $parser Parser Parent parser param: $title string Title to split param: $parts int Number of parts to keep param: $offset int Offset starting at 1 return: string |
checkLength( $text ) X-Ref |
Verifies parameter is less than max string length. param: $text return: bool |
tooLongError() X-Ref |
Generates error message. Called when string is too long. return: string |
runLen( $parser, $inStr = '' ) X-Ref |
{{#len:string}} Reports number of characters in string. param: $parser Parser param: $inStr string return: int |
runPos( $parser, $inStr = '', $inNeedle = '', $inOffset = 0 ) X-Ref |
{{#pos: string | needle | offset}} Finds first occurrence of "needle" in "string" starting at "offset". Note: If the needle is an empty string, single space is used instead. Note: If the needle is not found, empty string is returned. param: $parser Parser param: $inStr string param: $inNeedle int|string param: $inOffset int return: int|string |
runRPos( $parser, $inStr = '', $inNeedle = '' ) X-Ref |
{{#rpos: string | needle}} Finds last occurrence of "needle" in "string". Note: If the needle is an empty string, single space is used instead. Note: If the needle is not found, -1 is returned. param: $parser Parser param: $inStr string param: $inNeedle int|string return: int|string |
runSub( $parser, $inStr = '', $inStart = 0, $inLength = 0 ) X-Ref |
{{#sub: string | start | length }} Returns substring of "string" starting at "start" and having "length" characters. Note: If length is zero, the rest of the input is returned. Note: A negative value for "start" operates from the end of the "string". Note: A negative value for "length" returns a string reduced in length by that amount. param: $parser Parser param: $inStr string param: $inStart int param: $inLength int return: string |
runCount( $parser, $inStr = '', $inSubStr = '' ) X-Ref |
{{#count: string | substr }} Returns number of occurrences of "substr" in "string". Note: If "substr" is empty, a single space is used. param: $parser param: $inStr string param: $inSubStr string return: int|string |
runReplace( $parser, $inStr = '',$inReplaceFrom = '', $inReplaceTo = '', $inLimit = -1 ) X-Ref |
{{#replace:string | from | to | limit }} Replaces each occurrence of "from" in "string" with "to". At most "limit" replacements are performed. Note: Armored against replacements that would generate huge strings. Note: If "from" is an empty string, single space is used instead. param: $parser Parser param: $inStr string param: $inReplaceFrom string param: $inReplaceTo string param: $inLimit int return: mixed|string |
runExplode( $parser, $inStr = '', $inDiv = '', $inPos = 0, $inLim = null ) X-Ref |
{{#explode:string | delimiter | position | limit}} Breaks "string" into chunks separated by "delimiter" and returns the chunk identified by "position". Note: Negative position can be used to specify tokens from the end. Note: If the divider is an empty string, single space is used instead. Note: Empty string is returned if there are not enough exploded chunks. param: $parser Parser param: $inStr string param: $inDiv string param: $inPos int param: $inLim int|null return: string |
runUrlDecode( $parser, $inStr = '' ) X-Ref |
{{#urldecode:string}} Decodes URL-encoded (like%20that) strings. param: $parser Parser param: $inStr string return: string |
decodeTrimExpand( $obj, $frame, &$trimExpanded = null ) X-Ref |
Take a PPNode (-ish thing), expand it, remove entities, and trim. For use when doing string comparisions, where user expects entities to be equal for what they stand for (e.g. comparisions with {{PAGENAME}}) param: $obj PPNode|string Thing to expand param: $frame PPFrame param: &$trimExpanded String Expanded and trimmed version of PPNode, but with char refs intact return: String The trimmed, expanded and entity reference decoded version of the PPNode |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |