mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ParserFunctions
synced 2024-11-15 11:59:54 +00:00
More function documentation
This commit is contained in:
parent
ac9d9392b8
commit
956982c04a
|
@ -204,6 +204,13 @@ class ExtParserFunctions {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @static
|
||||||
|
* @param $parser Parser
|
||||||
|
* @param $frame PPFrame
|
||||||
|
* @param $args
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public static function switchObj( $parser, $frame, $args ) {
|
public static function switchObj( $parser, $frame, $args ) {
|
||||||
if ( count( $args ) == 0 ) {
|
if ( count( $args ) == 0 ) {
|
||||||
return '';
|
return '';
|
||||||
|
@ -263,6 +270,8 @@ class ExtParserFunctions {
|
||||||
*
|
*
|
||||||
* Following subpage link syntax instead of standard path syntax, an
|
* Following subpage link syntax instead of standard path syntax, an
|
||||||
* initial slash is treated as a relative path, and vice versa.
|
* initial slash is treated as a relative path, and vice versa.
|
||||||
|
*
|
||||||
|
* @param $parser Parser
|
||||||
*/
|
*/
|
||||||
public static function rel2abs( $parser , $to = '' , $from = '' ) {
|
public static function rel2abs( $parser , $to = '' , $from = '' ) {
|
||||||
|
|
||||||
|
@ -318,6 +327,12 @@ class ExtParserFunctions {
|
||||||
return implode( '/' , $newExploded );
|
return implode( '/' , $newExploded );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @static
|
||||||
|
* @param $parser Parser
|
||||||
|
* @param $frame PPFrame
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
public static function incrementIfexistCount( $parser, $frame ) {
|
public static function incrementIfexistCount( $parser, $frame ) {
|
||||||
// Don't let this be called more than a certain number of times. It tends to make the database explode.
|
// Don't let this be called more than a certain number of times. It tends to make the database explode.
|
||||||
global $wgExpensiveParserFunctionLimit;
|
global $wgExpensiveParserFunctionLimit;
|
||||||
|
|
Loading…
Reference in a new issue