[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
Parser functions provided by MediaWiki core This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
File Size: | 1256 lines (40 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
CoreParserFunctions:: (79 methods):
register()
intFunction()
formatDate()
ns()
nse()
urlencode()
lcfirst()
ucfirst()
lc()
uc()
localurl()
localurle()
fullurl()
fullurle()
canonicalurl()
canonicalurle()
urlFunction()
formatnum()
grammar()
gender()
plural()
displaytitle()
matchAgainstMagicword()
formatRaw()
numberofpages()
numberofusers()
numberofactiveusers()
numberofarticles()
numberoffiles()
numberofadmins()
numberofedits()
numberofviews()
pagesinnamespace()
numberingroup()
mwnamespace()
namespacee()
namespacenumber()
talkspace()
talkspacee()
subjectspace()
subjectspacee()
pagename()
pagenamee()
fullpagename()
fullpagenamee()
subpagename()
subpagenamee()
rootpagename()
rootpagenamee()
basepagename()
basepagenamee()
talkpagename()
talkpagenamee()
subjectpagename()
subjectpagenamee()
pagesincategory()
pagesize()
protectionlevel()
language()
pad()
padleft()
padright()
anchorencode()
special()
speciale()
defaultsort()
filepath()
tagObj()
getCachedRevisionObject()
pageid()
revisionid()
revisionday()
revisionday2()
revisionmonth()
revisionmonth1()
revisionyear()
revisiontimestamp()
revisionuser()
cascadingsources()
Class: CoreParserFunctions - X-Ref
Various core parser functions, registered in Parser::firstCallInit()register( $parser ) X-Ref |
param: Parser $parser return: void |
intFunction( $parser, $part1 = '' ) X-Ref |
param: Parser $parser param: string $part1 return: array |
formatDate( $parser, $date, $defaultPref = null ) X-Ref |
param: Parser $parser param: string $date param: string $defaultPref return: string |
ns( $parser, $part1 = '' ) X-Ref |
No description |
nse( $parser, $part1 = '' ) X-Ref |
No description |
urlencode( $parser, $s = '', $arg = null ) X-Ref |
urlencodes a string according to one of three patterns: (bug 22474) By default (for HTTP "query" strings), spaces are encoded as '+'. Or to encode a value for the HTTP "path", spaces are encoded as '%20'. For links to "wiki"s, or similar software, spaces are encoded as '_', param: Parser $parser param: string $s The text to encode. param: string $arg (optional): The type of encoding. return: string |
lcfirst( $parser, $s = '' ) X-Ref |
No description |
ucfirst( $parser, $s = '' ) X-Ref |
No description |
lc( $parser, $s = '' ) X-Ref |
param: Parser $parser param: string $s return: string |
uc( $parser, $s = '' ) X-Ref |
param: Parser $parser param: string $s return: string |
localurl( $parser, $s = '', $arg = null ) X-Ref |
No description |
localurle( $parser, $s = '', $arg = null ) X-Ref |
No description |
fullurl( $parser, $s = '', $arg = null ) X-Ref |
No description |
fullurle( $parser, $s = '', $arg = null ) X-Ref |
No description |
canonicalurl( $parser, $s = '', $arg = null ) X-Ref |
No description |
canonicalurle( $parser, $s = '', $arg = null ) X-Ref |
No description |
urlFunction( $func, $s = '', $arg = null ) X-Ref |
No description |
formatnum( $parser, $num = '', $arg = null ) X-Ref |
param: Parser $parser param: string $num param: string $arg return: string |
grammar( $parser, $case = '', $word = '' ) X-Ref |
param: Parser $parser param: string $case param: string $word return: string |
gender( $parser, $username ) X-Ref |
param: Parser $parser param: string $username return: string |
plural( $parser, $text = '' ) X-Ref |
param: Parser $parser param: string $text return: string |
displaytitle( $parser, $text = '', $uarg = '' ) X-Ref |
Override the title of the page when viewed, provided we've been given a title which will normalise to the canonical title param: Parser $parser Parent parser param: string $text Desired title text param: string $uarg return: string |
matchAgainstMagicword( $magicword, $value ) X-Ref |
Matches the given value against the value of given magic word param: string $magicword Magic word key param: string $value Value to match return: bool True on successful match |
formatRaw( $num, $raw ) X-Ref |
No description |
numberofpages( $parser, $raw = null ) X-Ref |
No description |
numberofusers( $parser, $raw = null ) X-Ref |
No description |
numberofactiveusers( $parser, $raw = null ) X-Ref |
No description |
numberofarticles( $parser, $raw = null ) X-Ref |
No description |
numberoffiles( $parser, $raw = null ) X-Ref |
No description |
numberofadmins( $parser, $raw = null ) X-Ref |
No description |
numberofedits( $parser, $raw = null ) X-Ref |
No description |
numberofviews( $parser, $raw = null ) X-Ref |
No description |
pagesinnamespace( $parser, $namespace = 0, $raw = null ) X-Ref |
No description |
numberingroup( $parser, $name = '', $raw = null ) X-Ref |
No description |
mwnamespace( $parser, $title = null ) X-Ref |
Given a title, return the namespace name that would be given by the corresponding magic word Note: function name changed to "mwnamespace" rather than "namespace" to not break PHP 5.3 param: Parser $parser param: string $title return: mixed|string |
namespacee( $parser, $title = null ) X-Ref |
No description |
namespacenumber( $parser, $title = null ) X-Ref |
No description |
talkspace( $parser, $title = null ) X-Ref |
No description |
talkspacee( $parser, $title = null ) X-Ref |
No description |
subjectspace( $parser, $title = null ) X-Ref |
No description |
subjectspacee( $parser, $title = null ) X-Ref |
No description |
pagename( $parser, $title = null ) X-Ref |
Functions to get and normalize pagenames, corresponding to the magic words of the same names param: Parser $parser param: string $title return: string |
pagenamee( $parser, $title = null ) X-Ref |
No description |
fullpagename( $parser, $title = null ) X-Ref |
No description |
fullpagenamee( $parser, $title = null ) X-Ref |
No description |
subpagename( $parser, $title = null ) X-Ref |
No description |
subpagenamee( $parser, $title = null ) X-Ref |
No description |
rootpagename( $parser, $title = null ) X-Ref |
No description |
rootpagenamee( $parser, $title = null ) X-Ref |
No description |
basepagename( $parser, $title = null ) X-Ref |
No description |
basepagenamee( $parser, $title = null ) X-Ref |
No description |
talkpagename( $parser, $title = null ) X-Ref |
No description |
talkpagenamee( $parser, $title = null ) X-Ref |
No description |
subjectpagename( $parser, $title = null ) X-Ref |
No description |
subjectpagenamee( $parser, $title = null ) X-Ref |
No description |
pagesincategory( $parser, $name = '', $arg1 = null, $arg2 = null ) X-Ref |
Return the number of pages, files or subcats in the given category, or 0 if it's nonexistent. This is an expensive parser function and can't be called too many times per page. param: Parser $parser param: string $name param: string $arg1 param: string $arg2 return: string |
pagesize( $parser, $page = '', $raw = null ) X-Ref |
Return the size of the given page, or 0 if it's nonexistent. This is an expensive parser function and can't be called too many times per page. param: Parser $parser param: string $page Name of page to check (Default: empty string) param: string $raw Should number be human readable with commas or just number return: string |
protectionlevel( $parser, $type = '', $title = '' ) X-Ref |
Returns the requested protection level for the current page. This is an expensive parser function and can't be called too many times per page, unless the protection levels for the given title have already been retrieved param: Parser $parser param: string $type param: string $title return: string |
language( $parser, $code = '', $inLanguage = '' ) X-Ref |
Gives language names. param: Parser $parser param: string $code Language code (of which to get name) param: string $inLanguage Language code (in which to get name) return: string |
pad( $parser, $string, $length, $padding = '0', $direction = STR_PAD_RIGHT ) X-Ref |
Unicode-safe str_pad with the restriction that $length is forced to be <= 500 param: Parser $parser param: string $string param: int $length param: string $padding param: int $direction return: string |
padleft( $parser, $string = '', $length = 0, $padding = '0' ) X-Ref |
No description |
padright( $parser, $string = '', $length = 0, $padding = '0' ) X-Ref |
No description |
anchorencode( $parser, $text ) X-Ref |
param: Parser $parser param: string $text return: string |
special( $parser, $text ) X-Ref |
No description |
speciale( $parser, $text ) X-Ref |
No description |
defaultsort( $parser, $text, $uarg = '' ) X-Ref |
param: Parser $parser param: string $text The sortkey to use param: string $uarg Either "noreplace" or "noerror" (in en) return: string |
filepath( $parser, $name = '', $argA = '', $argB = '' ) X-Ref |
No description |
tagObj( $parser, $frame, $args ) X-Ref |
Parser function to extension tag adaptor param: Parser $parser param: PPFrame $frame param: array $args return: string |
getCachedRevisionObject( $parser, $title = null ) X-Ref |
Fetched the current revision of the given title and return this. Will increment the expensive function count and add a template link to get the value refreshed on changes. For a given title, which is equal to the current parser title, the revision object from the parser is used, when that is the current one param: Parser $parser param: Title $title return: Revision |
pageid( $parser, $title = null ) X-Ref |
Get the pageid of a specified page param: Parser $parser param: string $title Title to get the pageid from return: int|null|string |
revisionid( $parser, $title = null ) X-Ref |
Get the id from the last revision of a specified page. param: Parser $parser param: string $title Title to get the id from return: int|null|string |
revisionday( $parser, $title = null ) X-Ref |
Get the day from the last revision of a specified page. param: Parser $parser param: string $title Title to get the day from return: string |
revisionday2( $parser, $title = null ) X-Ref |
Get the day with leading zeros from the last revision of a specified page. param: Parser $parser param: string $title Title to get the day from return: string |
revisionmonth( $parser, $title = null ) X-Ref |
Get the month with leading zeros from the last revision of a specified page. param: Parser $parser param: string $title Title to get the month from return: string |
revisionmonth1( $parser, $title = null ) X-Ref |
Get the month from the last revision of a specified page. param: Parser $parser param: string $title Title to get the month from return: string |
revisionyear( $parser, $title = null ) X-Ref |
Get the year from the last revision of a specified page. param: Parser $parser param: string $title Title to get the year from return: string |
revisiontimestamp( $parser, $title = null ) X-Ref |
Get the timestamp from the last revision of a specified page. param: Parser $parser param: string $title Title to get the timestamp from return: string |
revisionuser( $parser, $title = null ) X-Ref |
Get the user from the last revision of a specified page. param: Parser $parser param: string $title Title to get the user from return: string |
cascadingsources( $parser, $title = '' ) X-Ref |
Returns the sources of any cascading protection acting on a specified page. Pages will not return their own title unless they transclude themselves. This is an expensive parser function and can't be called too many times per page, unless cascading protection sources for the page have already been loaded. param: Parser $parser param: string $title return: string |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |