MediaWiki 1.40.4
CoreParserFunctions Class Reference

Various core parser functions, registered in every Parser. More...

Static Public Member Functions

static anchorencode ( $parser, $text)
 
static basepagename ( $parser, $title=null)
 
static basepagenamee ( $parser, $title=null)
 
static bidi ( $parser, $text='')
 
static canonicalurl ( $parser, $s='', $arg=null)
 
static canonicalurle ( $parser, $s='', $arg=null)
 
static cascadingsources ( $parser, $title='')
 Returns the sources of any cascading protection acting on a specified page.
 
static defaultsort ( $parser, $text, $uarg='')
 
static displaytitle ( $parser, $text='', $uarg='')
 Override the title of the page when viewed, provided we've been given a title which will normalise to the canonical title.
 
static filepath ( $parser, $name='', $argA='', $argB='')
 Usage {{filepath|300}}, {{filepath|nowiki}}, {{filepath|nowiki|300}} or {{filepath|300|nowiki}} or {{filepath|300px}}, {{filepath|200x300px}}, {{filepath|nowiki|200x300px}}, {{filepath|200x300px|nowiki}}.
 
static formatDate ( $parser, $date, $defaultPref=null)
 
static formatnum ( $parser, $num='', $arg=null)
 
static formatRaw ( $num, $raw, $language, MagicWordFactory $magicWordFactory=null)
 Formats a number according to a language.
 
static fullpagename ( $parser, $title=null)
 
static fullpagenamee ( $parser, $title=null)
 
static fullurl ( $parser, $s='', $arg=null)
 
static fullurle ( $parser, $s='', $arg=null)
 
static gender ( $parser, $username,... $forms)
 
static grammar ( $parser, $case='', $word='')
 
static intFunction ( $parser, $part1='',... $params)
 
static language ( $parser, $code='', $inLanguage='')
 Gives language names.
 
static lc ( $parser, $s='')
 
static lcfirst ( $parser, $s='')
 
static localurl ( $parser, $s='', $arg=null)
 
static localurle ( $parser, $s='', $arg=null)
 
static mwnamespace ( $parser, $title=null)
 Given a title, return the namespace name that would be given by the corresponding magic word.
 
static namespacee ( $parser, $title=null)
 
static namespacenumber ( $parser, $title=null)
 
static ns ( $parser, $part1='')
 
static nse ( $parser, $part1='')
 
static numberingroup ( $parser, $name='', $raw=null)
 
static numberofactiveusers ( $parser, $raw=null)
 
static numberofadmins ( $parser, $raw=null)
 
static numberofarticles ( $parser, $raw=null)
 
static numberofedits ( $parser, $raw=null)
 
static numberoffiles ( $parser, $raw=null)
 
static numberofpages ( $parser, $raw=null)
 
static numberofusers ( $parser, $raw=null)
 
static pad ( $parser, $string, $length, $padding='0', $direction=STR_PAD_RIGHT)
 Unicode-safe str_pad with the restriction that $length is forced to be <= 500.
 
static padleft ( $parser, $string='', $length=0, $padding='0')
 
static padright ( $parser, $string='', $length=0, $padding='0')
 
static pageid ( $parser, $title=null)
 Get the pageid of a specified page.
 
static pagename ( $parser, $title=null)
 Functions to get and normalize pagenames, corresponding to the magic words of the same names.
 
static pagenamee ( $parser, $title=null)
 
static pagesincategory ( $parser, $name='', $arg1='', $arg2='')
 Return the number of pages, files or subcats in the given category, or 0 if it's nonexistent.
 
static pagesinnamespace ( $parser, $namespace=0, $raw=null)
 
static pagesize ( $parser, $page='', $raw=null)
 Return the size of the given page, or 0 if it's nonexistent.
 
static plural ( $parser, $text='',... $forms)
 
static protectionexpiry ( $parser, $type='', $title='')
 Returns the requested protection expiry for the current page.
 
static protectionlevel ( $parser, $type='', $title='')
 Returns the requested protection level for the current page.
 
static register (Parser $parser, ServiceOptions $options)
 
static revisionday ( $parser, $title=null)
 Get the day from the last revision of a specified page.
 
static revisionday2 ( $parser, $title=null)
 Get the day with leading zeros from the last revision of a specified page.
 
static revisionid ( $parser, $title=null)
 Get the id from the last revision of a specified page.
 
static revisionmonth ( $parser, $title=null)
 Get the month with leading zeros from the last revision of a specified page.
 
static revisionmonth1 ( $parser, $title=null)
 Get the month from the last revision of a specified page.
 
static revisiontimestamp ( $parser, $title=null)
 Get the timestamp from the last revision of a specified page.
 
static revisionuser ( $parser, $title=null)
 Get the user from the last revision of a specified page.
 
static revisionyear ( $parser, $title=null)
 Get the year from the last revision of a specified page.
 
static rootpagename ( $parser, $title=null)
 
static rootpagenamee ( $parser, $title=null)
 
static special ( $parser, $text)
 
static speciale ( $parser, $text)
 
static subjectpagename ( $parser, $title=null)
 
static subjectpagenamee ( $parser, $title=null)
 
static subjectspace ( $parser, $title=null)
 
static subjectspacee ( $parser, $title=null)
 
static subpagename ( $parser, $title=null)
 
static subpagenamee ( $parser, $title=null)
 
static tagObj ( $parser, $frame, $args)
 Parser function to extension tag adaptor.
 
static talkpagename ( $parser, $title=null)
 
static talkpagenamee ( $parser, $title=null)
 
static talkspace ( $parser, $title=null)
 
static talkspacee ( $parser, $title=null)
 
static uc ( $parser, $s='')
 
static ucfirst ( $parser, $s='')
 
static urlencode ( $parser, $s='', $arg=null)
 urlencodes a string according to one of three patterns: (T24474)
 
static urlFunction ( $func, $s='', $arg=null)
 

Public Attributes

const REGISTER_OPTIONS
 

Detailed Description

Various core parser functions, registered in every Parser.

Definition at line 41 of file CoreParserFunctions.php.

Member Function Documentation

◆ anchorencode()

static CoreParserFunctions::anchorencode ( $parser,
$text )
static
Parameters
Parser$parser
string$text
Returns
string

Definition at line 1070 of file CoreParserFunctions.php.

References Parser\guessSectionNameFromWikiText(), and Parser\killMarkers().

◆ basepagename()

static CoreParserFunctions::basepagename ( $parser,
$title = null )
static

Definition at line 810 of file CoreParserFunctions.php.

References $t, $title, and wfEscapeWikiText().

◆ basepagenamee()

static CoreParserFunctions::basepagenamee ( $parser,
$title = null )
static

Definition at line 818 of file CoreParserFunctions.php.

References $t, $title, wfEscapeWikiText(), and wfUrlencode().

◆ bidi()

static CoreParserFunctions::bidi ( $parser,
$text = '' )
static
Parameters
Parser$parser
string$text
Returns
string

Definition at line 449 of file CoreParserFunctions.php.

References Parser\getTargetLanguage().

◆ canonicalurl()

static CoreParserFunctions::canonicalurl ( $parser,
$s = '',
$arg = null )
static

Definition at line 296 of file CoreParserFunctions.php.

◆ canonicalurle()

static CoreParserFunctions::canonicalurle ( $parser,
$s = '',
$arg = null )
static

Definition at line 300 of file CoreParserFunctions.php.

◆ cascadingsources()

static CoreParserFunctions::cascadingsources ( $parser,
$title = '' )
static

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.

Parameters
Parser$parser
?string$title
Returns
string
Since
1.23

Definition at line 1607 of file CoreParserFunctions.php.

References $title, Parser\getTitle(), and Parser\incrementExpensiveFunctionCount().

◆ defaultsort()

static CoreParserFunctions::defaultsort ( $parser,
$text,
$uarg = '' )
static
Parameters
Parser$parser
string$textThe sortkey to use
string$uargEither "noreplace" or "noerror" (in en) both suppress errors, and noreplace does nothing if a default sortkey already exists.
Returns
string

Definition at line 1101 of file CoreParserFunctions.php.

References $magicWords, Parser\getMagicWordFactory(), Parser\getOutput(), Parser\getTargetLanguageConverter(), Parser\msg(), and wfEscapeWikiText().

◆ displaytitle()

static CoreParserFunctions::displaytitle ( $parser,
$text = '',
$uarg = '' )
static

Override the title of the page when viewed, provided we've been given a title which will normalise to the canonical title.

Parameters
Parser$parserParent parser
string$textDesired title text
string$uarg
Returns
string

Definition at line 462 of file CoreParserFunctions.php.

References $magicWords, $title, Parser\addTrackingCategory(), Parser\doQuotes(), Parser\getMagicWordFactory(), Parser\getOutput(), Parser\getTargetLanguageConverter(), Parser\getTitle(), MediaWiki\Title\Title\hasFragment(), Parser\killMarkers(), Parser\msg(), Message\plaintextParam(), and wfEscapeWikiText().

◆ filepath()

static CoreParserFunctions::filepath ( $parser,
$name = '',
$argA = '',
$argB = '' )
static

Usage {{filepath|300}}, {{filepath|nowiki}}, {{filepath|nowiki|300}} or {{filepath|300|nowiki}} or {{filepath|300px}}, {{filepath|200x300px}}, {{filepath|nowiki|200x300px}}, {{filepath|200x300px|nowiki}}.

Parameters
Parser$parser
string$name
string$argA
string$argB
Returns
array|string

Definition at line 1143 of file CoreParserFunctions.php.

References $file, Parser\parseWidthParam(), PROTO_RELATIVE, true, and wfExpandUrl().

◆ formatDate()

static CoreParserFunctions::formatDate ( $parser,
$date,
$defaultPref = null )
static
Parameters
Parser$parser
string$date
string | null$defaultPref
Returns
string

Definition at line 165 of file CoreParserFunctions.php.

References $lang, Parser\getOptions(), and Parser\getTargetLanguage().

◆ formatnum()

static CoreParserFunctions::formatnum ( $parser,
$num = '',
$arg = null )
static
Parameters
Parser$parser
string$num
string | null$arg
Returns
string

Definition at line 337 of file CoreParserFunctions.php.

References Parser\getMagicWordFactory(), Parser\getTargetLanguage(), and Parser\markerSkipCallback().

◆ formatRaw()

static CoreParserFunctions::formatRaw ( $num,
$raw,
$language,
MagicWordFactory $magicWordFactory = null )
static

Formats a number according to a language.

Parameters
int | float$num
?string$raw
Language | StubUserLang$language
MagicWordFactory | null$magicWordFactoryTo evaluate $raw
Returns
string

Definition at line 580 of file CoreParserFunctions.php.

◆ fullpagename()

static CoreParserFunctions::fullpagename ( $parser,
$title = null )
static

Definition at line 762 of file CoreParserFunctions.php.

References $t, $title, and wfEscapeWikiText().

◆ fullpagenamee()

static CoreParserFunctions::fullpagenamee ( $parser,
$title = null )
static

Definition at line 770 of file CoreParserFunctions.php.

References $t, $title, and wfEscapeWikiText().

◆ fullurl()

static CoreParserFunctions::fullurl ( $parser,
$s = '',
$arg = null )
static

Definition at line 283 of file CoreParserFunctions.php.

◆ fullurle()

static CoreParserFunctions::fullurle ( $parser,
$s = '',
$arg = null )
static

Definition at line 287 of file CoreParserFunctions.php.

◆ gender()

static CoreParserFunctions::gender ( $parser,
$username,
$forms )
static
Parameters
Parser$parser
string$username
string...$forms What to output for each gender
Returns
string

Definition at line 399 of file CoreParserFunctions.php.

References $title, Parser\getOptions(), Parser\getTargetLanguage(), User\newFromName(), and NS_USER.

◆ grammar()

static CoreParserFunctions::grammar ( $parser,
$case = '',
$word = '' )
static
Parameters
Parser$parser
string$case
string$word
Returns
string

Definition at line 388 of file CoreParserFunctions.php.

References Parser\getTargetLanguage(), and Parser\killMarkers().

◆ intFunction()

static CoreParserFunctions::intFunction ( $parser,
$part1 = '',
$params )
static
Parameters
Parser$parser
string$part1Message key
mixed...$params To pass to wfMessage()
Returns
array

Definition at line 148 of file CoreParserFunctions.php.

References Parser\getOptions(), and wfMessage().

◆ language()

static CoreParserFunctions::language ( $parser,
$code = '',
$inLanguage = '' )
static

Gives language names.

Parameters
Parser$parser
string$codeLanguage code (of which to get name)
string$inLanguageLanguage code (in which to get name)
Returns
string

Definition at line 1006 of file CoreParserFunctions.php.

References $lang.

◆ lc()

static CoreParserFunctions::lc ( $parser,
$s = '' )
static
Parameters
Parser$parser
string$s
Returns
string

Definition at line 257 of file CoreParserFunctions.php.

References Parser\getContentLanguage(), and Parser\markerSkipCallback().

◆ lcfirst()

static CoreParserFunctions::lcfirst ( $parser,
$s = '' )
static

Definition at line 244 of file CoreParserFunctions.php.

References Parser\getContentLanguage().

◆ localurl()

static CoreParserFunctions::localurl ( $parser,
$s = '',
$arg = null )
static

Definition at line 270 of file CoreParserFunctions.php.

◆ localurle()

static CoreParserFunctions::localurle ( $parser,
$s = '',
$arg = null )
static

Definition at line 274 of file CoreParserFunctions.php.

◆ mwnamespace()

static CoreParserFunctions::mwnamespace ( $parser,
$title = null )
static

Given a title, return the namespace name that would be given by the corresponding magic word.

Note
This function corresponded to the namespace parser function and magic variable, but namespace was a reserved word before PHP 7.
Parameters
Parser$parser
string | null$title
Returns
mixed|string
Deprecated
Use CoreParserFunctions::namespace() instead.

Definition at line 686 of file CoreParserFunctions.php.

References $title, and wfDeprecated().

◆ namespacee()

static CoreParserFunctions::namespacee ( $parser,
$title = null )
static

Definition at line 691 of file CoreParserFunctions.php.

References $t, $title, and wfUrlencode().

◆ namespacenumber()

static CoreParserFunctions::namespacenumber ( $parser,
$title = null )
static

Definition at line 699 of file CoreParserFunctions.php.

References $t, and $title.

◆ ns()

static CoreParserFunctions::ns ( $parser,
$part1 = '' )
static

Definition at line 183 of file CoreParserFunctions.php.

References Parser\getContentLanguage().

◆ nse()

static CoreParserFunctions::nse ( $parser,
$part1 = '' )
static

Definition at line 196 of file CoreParserFunctions.php.

References wfUrlencode().

◆ numberingroup()

static CoreParserFunctions::numberingroup ( $parser,
$name = '',
$raw = null )
static

◆ numberofactiveusers()

static CoreParserFunctions::numberofactiveusers ( $parser,
$raw = null )
static

Definition at line 602 of file CoreParserFunctions.php.

References SiteStats\activeUsers(), and Parser\getTargetLanguage().

◆ numberofadmins()

static CoreParserFunctions::numberofadmins ( $parser,
$raw = null )
static

◆ numberofarticles()

static CoreParserFunctions::numberofarticles ( $parser,
$raw = null )
static

Definition at line 606 of file CoreParserFunctions.php.

References SiteStats\articles(), and Parser\getTargetLanguage().

◆ numberofedits()

static CoreParserFunctions::numberofedits ( $parser,
$raw = null )
static

Definition at line 622 of file CoreParserFunctions.php.

References SiteStats\edits(), and Parser\getTargetLanguage().

◆ numberoffiles()

static CoreParserFunctions::numberoffiles ( $parser,
$raw = null )
static

Definition at line 610 of file CoreParserFunctions.php.

References Parser\getTargetLanguage(), and SiteStats\images().

◆ numberofpages()

static CoreParserFunctions::numberofpages ( $parser,
$raw = null )
static

Definition at line 594 of file CoreParserFunctions.php.

References Parser\getTargetLanguage(), and SiteStats\pages().

◆ numberofusers()

static CoreParserFunctions::numberofusers ( $parser,
$raw = null )
static

Definition at line 598 of file CoreParserFunctions.php.

References Parser\getTargetLanguage(), and SiteStats\users().

◆ pad()

static CoreParserFunctions::pad ( $parser,
$string,
$length,
$padding = '0',
$direction = STR_PAD_RIGHT )
static

Unicode-safe str_pad with the restriction that $length is forced to be <= 500.

Parameters
Parser$parser
string$string
string$length
string$padding
int$direction
Returns
string

Definition at line 1024 of file CoreParserFunctions.php.

References Parser\killMarkers().

◆ padleft()

static CoreParserFunctions::padleft ( $parser,
$string = '',
$length = 0,
$padding = '0' )
static

Definition at line 1057 of file CoreParserFunctions.php.

◆ padright()

static CoreParserFunctions::padright ( $parser,
$string = '',
$length = 0,
$padding = '0' )
static

Definition at line 1061 of file CoreParserFunctions.php.

◆ pageid()

static CoreParserFunctions::pageid ( $parser,
$title = null )
static

Get the pageid of a specified page.

Parameters
Parser$parser
string | null$titleTitle to get the pageid from
Returns
int|null|string
Since
1.23

Definition at line 1316 of file CoreParserFunctions.php.

References $t, $title, Parser\getOutput(), Parser\getTitle(), and Parser\incrementExpensiveFunctionCount().

◆ pagename()

static CoreParserFunctions::pagename ( $parser,
$title = null )
static

Functions to get and normalize pagenames, corresponding to the magic words of the same names.

Parameters
Parser$parser
string | null$title
Returns
string

Definition at line 746 of file CoreParserFunctions.php.

References $t, $title, and wfEscapeWikiText().

◆ pagenamee()

static CoreParserFunctions::pagenamee ( $parser,
$title = null )
static

Definition at line 754 of file CoreParserFunctions.php.

References $t, $title, and wfEscapeWikiText().

◆ pagesincategory()

static CoreParserFunctions::pagesincategory ( $parser,
$name = '',
$arg1 = '',
$arg2 = '' )
static

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.

Parameters
Parser$parser
string$name
string$arg1
string$arg2
Returns
string

Definition at line 868 of file CoreParserFunctions.php.

References $magicWords, $title, $type, Parser\getContentLanguage(), Parser\getMagicWordFactory(), Parser\getTargetLanguage(), Parser\incrementExpensiveFunctionCount(), and NS_CATEGORY.

◆ pagesinnamespace()

static CoreParserFunctions::pagesinnamespace ( $parser,
$namespace = 0,
$raw = null )
static

Definition at line 626 of file CoreParserFunctions.php.

References Parser\getTargetLanguage(), and SiteStats\pagesInNs().

◆ pagesize()

static CoreParserFunctions::pagesize ( $parser,
$page = '',
$raw = null )
static

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.

Parameters
Parser$parser
string$pageName of page to check (Default: empty string)
string | null$rawShould number be human readable with commas or just number
Returns
string

Definition at line 935 of file CoreParserFunctions.php.

References $title, and Parser\getTargetLanguage().

◆ plural()

static CoreParserFunctions::plural ( $parser,
$text = '',
$forms )
static
Parameters
Parser$parser
string$text
string...$forms What to output for each number (singular, dual, plural, etc.)
Returns
string

Definition at line 437 of file CoreParserFunctions.php.

References Parser\getTargetLanguage().

◆ protectionexpiry()

static CoreParserFunctions::protectionexpiry ( $parser,
$type = '',
$title = '' )
static

Returns the requested protection expiry for the current page.

This is an expensive parser function and can't be called too many times per page, unless the protection levels/expiries for the given title have already been retrieved

Parameters
Parser$parser
string$type
string$title
Returns
string

Definition at line 988 of file CoreParserFunctions.php.

References $title, $type, Parser\getTitle(), and Parser\incrementExpensiveFunctionCount().

◆ protectionlevel()

static CoreParserFunctions::protectionlevel ( $parser,
$type = '',
$title = '' )
static

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/expiries for the given title have already been retrieved

Parameters
Parser$parser
string$type
string$title
Returns
string

Definition at line 964 of file CoreParserFunctions.php.

References $title, $type, Parser\getTitle(), and Parser\incrementExpensiveFunctionCount().

◆ register()

static CoreParserFunctions::register ( Parser $parser,
ServiceOptions $options )
static
Parameters
Parser$parser
ServiceOptions$options
Returns
void
Exceptions
MWException
Access: internal

Definition at line 62 of file CoreParserFunctions.php.

References Parser\setFunctionHook(), Parser\SFH_NO_HASH, and Parser\SFH_OBJECT_ARGS.

◆ revisionday()

static CoreParserFunctions::revisionday ( $parser,
$title = null )
static

Get the day from the last revision of a specified page.

Parameters
Parser$parser
string | null$titleTitle to get the day from
Returns
string
Since
1.23

Definition at line 1471 of file CoreParserFunctions.php.

References $t, and $title.

◆ revisionday2()

static CoreParserFunctions::revisionday2 ( $parser,
$title = null )
static

Get the day with leading zeros from the last revision of a specified page.

Parameters
Parser$parser
string | null$titleTitle to get the day from
Returns
string
Since
1.23

Definition at line 1488 of file CoreParserFunctions.php.

References $t, and $title.

◆ revisionid()

static CoreParserFunctions::revisionid ( $parser,
$title = null )
static

Get the id from the last revision of a specified page.

Parameters
Parser$parser
string | null$titleTitle to get the id from
Returns
int|null|string
Since
1.23

Definition at line 1366 of file CoreParserFunctions.php.

References $t, $title, Parser\getOptions(), Parser\getOutput(), Parser\getRevisionId(), Parser\getRevisionRecordObject(), and Parser\getTitle().

◆ revisionmonth()

static CoreParserFunctions::revisionmonth ( $parser,
$title = null )
static

Get the month with leading zeros from the last revision of a specified page.

Parameters
Parser$parser
string | null$titleTitle to get the month from
Returns
string
Since
1.23

Definition at line 1505 of file CoreParserFunctions.php.

References $t, and $title.

◆ revisionmonth1()

static CoreParserFunctions::revisionmonth1 ( $parser,
$title = null )
static

Get the month from the last revision of a specified page.

Parameters
Parser$parser
string | null$titleTitle to get the month from
Returns
string
Since
1.23

Definition at line 1522 of file CoreParserFunctions.php.

References $t, and $title.

◆ revisiontimestamp()

static CoreParserFunctions::revisiontimestamp ( $parser,
$title = null )
static

Get the timestamp from the last revision of a specified page.

Parameters
Parser$parser
string | null$titleTitle to get the timestamp from
Returns
string
Since
1.23

Definition at line 1556 of file CoreParserFunctions.php.

References $t, and $title.

◆ revisionuser()

static CoreParserFunctions::revisionuser ( $parser,
$title = null )
static

Get the user from the last revision of a specified page.

Parameters
Parser$parser
string | null$titleTitle to get the user from
Returns
string
Since
1.23

Definition at line 1573 of file CoreParserFunctions.php.

References $t, $title, Parser\getOutput(), Parser\getRevisionUser(), and Parser\getTitle().

◆ revisionyear()

static CoreParserFunctions::revisionyear ( $parser,
$title = null )
static

Get the year from the last revision of a specified page.

Parameters
Parser$parser
string | null$titleTitle to get the year from
Returns
string
Since
1.23

Definition at line 1539 of file CoreParserFunctions.php.

References $t, and $title.

◆ rootpagename()

static CoreParserFunctions::rootpagename ( $parser,
$title = null )
static

Definition at line 794 of file CoreParserFunctions.php.

References $t, $title, and wfEscapeWikiText().

◆ rootpagenamee()

static CoreParserFunctions::rootpagenamee ( $parser,
$title = null )
static

Definition at line 802 of file CoreParserFunctions.php.

References $t, $title, wfEscapeWikiText(), and wfUrlencode().

◆ special()

static CoreParserFunctions::special ( $parser,
$text )
static

Definition at line 1076 of file CoreParserFunctions.php.

References $title, SpecialPage\getTitleFor(), and NS_SPECIAL.

◆ speciale()

static CoreParserFunctions::speciale ( $parser,
$text )
static

Definition at line 1089 of file CoreParserFunctions.php.

References wfUrlencode().

◆ subjectpagename()

static CoreParserFunctions::subjectpagename ( $parser,
$title = null )
static

Definition at line 842 of file CoreParserFunctions.php.

References $t, $title, and wfEscapeWikiText().

◆ subjectpagenamee()

static CoreParserFunctions::subjectpagenamee ( $parser,
$title = null )
static

Definition at line 850 of file CoreParserFunctions.php.

References $t, $title, and wfEscapeWikiText().

◆ subjectspace()

static CoreParserFunctions::subjectspace ( $parser,
$title = null )
static

Definition at line 723 of file CoreParserFunctions.php.

References $t, and $title.

◆ subjectspacee()

static CoreParserFunctions::subjectspacee ( $parser,
$title = null )
static

Definition at line 731 of file CoreParserFunctions.php.

References $t, $title, and wfUrlencode().

◆ subpagename()

static CoreParserFunctions::subpagename ( $parser,
$title = null )
static

Definition at line 778 of file CoreParserFunctions.php.

References $t, $title, and wfEscapeWikiText().

◆ subpagenamee()

static CoreParserFunctions::subpagenamee ( $parser,
$title = null )
static

Definition at line 786 of file CoreParserFunctions.php.

References $t, $title, and wfEscapeWikiText().

◆ tagObj()

static CoreParserFunctions::tagObj ( $parser,
$frame,
$args )
static

Parser function to extension tag adaptor.

Parameters
Parser$parser
PPFrame$frame
PPNode[]$args
Returns
string

Definition at line 1184 of file CoreParserFunctions.php.

References Parser\extensionSubstitution(), Parser\getStripList(), and Parser\tagNeedsNowikiStrippedInTagPF().

◆ talkpagename()

static CoreParserFunctions::talkpagename ( $parser,
$title = null )
static

Definition at line 826 of file CoreParserFunctions.php.

References $t, $title, and wfEscapeWikiText().

◆ talkpagenamee()

static CoreParserFunctions::talkpagenamee ( $parser,
$title = null )
static

Definition at line 834 of file CoreParserFunctions.php.

References $t, $title, and wfEscapeWikiText().

◆ talkspace()

static CoreParserFunctions::talkspace ( $parser,
$title = null )
static

Definition at line 707 of file CoreParserFunctions.php.

References $t, and $title.

◆ talkspacee()

static CoreParserFunctions::talkspacee ( $parser,
$title = null )
static

Definition at line 715 of file CoreParserFunctions.php.

References $t, $title, and wfUrlencode().

◆ uc()

static CoreParserFunctions::uc ( $parser,
$s = '' )
static
Parameters
Parser$parser
string$s
Returns
string

Definition at line 266 of file CoreParserFunctions.php.

References Parser\getContentLanguage(), and Parser\markerSkipCallback().

◆ ucfirst()

static CoreParserFunctions::ucfirst ( $parser,
$s = '' )
static

Definition at line 248 of file CoreParserFunctions.php.

References Parser\getContentLanguage().

◆ urlencode()

static CoreParserFunctions::urlencode ( $parser,
$s = '',
$arg = null )
static

urlencodes a string according to one of three patterns: (T24474)

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 '_',

Parameters
Parser$parser
string$sThe text to encode.
string | null$arg(optional): The type of encoding.
Returns
string

Definition at line 216 of file CoreParserFunctions.php.

References $magicWords, Parser\getMagicWordFactory(), and Parser\killMarkers().

◆ urlFunction()

static CoreParserFunctions::urlFunction ( $func,
$s = '',
$arg = null )
static

Definition at line 309 of file CoreParserFunctions.php.

References $title, NS_FILE, and NS_MEDIA.

Member Data Documentation

◆ REGISTER_OPTIONS

const CoreParserFunctions::REGISTER_OPTIONS
Initial value:
= [
MainConfigNames::AllowDisplayTitle,
MainConfigNames::AllowSlowParserFunctions,
]
Access: internal

Definition at line 48 of file CoreParserFunctions.php.


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