MediaWiki  master
CoreParserFunctions Class Reference

Various core parser functions, registered in Parser::firstCallInit() 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. More...
 
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. More...
 
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}}. More...
 
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. More...
 
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. More...
 
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 Note: function name changed to "mwnamespace" rather than "namespace" to not break PHP 5.3. More...
 
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. More...
 
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. More...
 
static pagename ( $parser, $title=null)
 Functions to get and normalize pagenames, corresponding to the magic words of the same names. More...
 
static pagenamee ( $parser, $title=null)
 
static pagesincategory ( $parser, $name='', $arg1=null, $arg2=null)
 Return the number of pages, files or subcats in the given category, or 0 if it's nonexistent. More...
 
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. More...
 
static plural ( $parser, $text='',... $forms)
 
static protectionexpiry ( $parser, $type='', $title='')
 Returns the requested protection expiry for the current page. More...
 
static protectionlevel ( $parser, $type='', $title='')
 Returns the requested protection level for the current page. More...
 
static register ( $parser)
 
static revisionday ( $parser, $title=null)
 Get the day from the last revision of a specified page. More...
 
static revisionday2 ( $parser, $title=null)
 Get the day with leading zeros from the last revision of a specified page. More...
 
static revisionid ( $parser, $title=null)
 Get the id from the last revision of a specified page. More...
 
static revisionmonth ( $parser, $title=null)
 Get the month with leading zeros from the last revision of a specified page. More...
 
static revisionmonth1 ( $parser, $title=null)
 Get the month from the last revision of a specified page. More...
 
static revisiontimestamp ( $parser, $title=null)
 Get the timestamp from the last revision of a specified page. More...
 
static revisionuser ( $parser, $title=null)
 Get the user from the last revision of a specified page. More...
 
static revisionyear ( $parser, $title=null)
 Get the year from the last revision of a specified page. More...
 
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. More...
 
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) More...
 
static urlFunction ( $func, $s='', $arg=null)
 

Static Private Member Functions

static getCachedRevisionObject ( $parser, $title=null)
 Fetched the current revision of the given title and return this. More...
 
static matchAgainstMagicword (MagicWordFactory $magicWordFactory, $magicword, $value)
 Matches the given value against the value of given magic word. More...
 

Detailed Description

Various core parser functions, registered in Parser::firstCallInit()

Definition at line 29 of file CoreParserFunctions.php.

Member Function Documentation

◆ anchorencode()

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

Definition at line 959 of file CoreParserFunctions.php.

References $parser, $section, Sanitizer\safeEncodeAttribute(), and string.

◆ basepagename()

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

Definition at line 694 of file CoreParserFunctions.php.

References $t, $title, Title\newFromText(), and wfEscapeWikiText().

◆ basepagenamee()

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

Definition at line 702 of file CoreParserFunctions.php.

References $t, $title, Title\newFromText(), wfEscapeWikiText(), and wfUrlencode().

◆ bidi()

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

Definition at line 367 of file CoreParserFunctions.php.

References $parser.

◆ canonicalurl()

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

Definition at line 245 of file CoreParserFunctions.php.

References $s.

◆ canonicalurle()

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

Definition at line 249 of file CoreParserFunctions.php.

References $s.

◆ 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 1359 of file CoreParserFunctions.php.

References $parser, $title, as, and Title\newFromText().

Referenced by Parser\getVariableValue().

◆ 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 990 of file CoreParserFunctions.php.

References $magicWords, $parser, null, wfEscapeWikiText(), and wfMessage().

◆ 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 380 of file CoreParserFunctions.php.

References $magicWords, $params, $parser, $title, $wgRestrictDisplayTitle, Sanitizer\checkCss(), Sanitizer\decodeTagAttributes(), Title\newFromText(), Sanitizer\normalizeCharReferences(), null, Sanitizer\removeHTMLtags(), Sanitizer\safeEncodeTagAttributes(), Sanitizer\stripAllTags(), text, wfEscapeWikiText(), and wfMessage().

◆ 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 1032 of file CoreParserFunctions.php.

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

◆ formatDate()

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

Definition at line 114 of file CoreParserFunctions.php.

References $lang, and $parser.

◆ formatnum()

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

Definition at line 289 of file CoreParserFunctions.php.

References $parser.

◆ 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 495 of file CoreParserFunctions.php.

References null.

◆ fullpagename()

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

Definition at line 646 of file CoreParserFunctions.php.

References $t, $title, Title\newFromText(), and wfEscapeWikiText().

◆ fullpagenamee()

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

Definition at line 654 of file CoreParserFunctions.php.

References $t, $title, Title\newFromText(), and wfEscapeWikiText().

◆ fullurl()

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

Definition at line 232 of file CoreParserFunctions.php.

References $s.

◆ fullurle()

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

Definition at line 236 of file CoreParserFunctions.php.

References $s.

◆ 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 319 of file CoreParserFunctions.php.

References $parser, $ret, $title, $user, $username, User\getDefaultOption(), User\newFromName(), Title\newFromText(), and NS_USER.

◆ getCachedRevisionObject()

static CoreParserFunctions::getCachedRevisionObject (   $parser,
  $title = null 
)
staticprivate

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

Parameters
Parser$parser
Title$title
Returns
Revision
Since
1.23

Definition at line 1132 of file CoreParserFunctions.php.

References $parser, $rev, $title, null, and wfDebug().

◆ grammar()

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

Definition at line 308 of file CoreParserFunctions.php.

References $parser.

◆ 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 97 of file CoreParserFunctions.php.

References $params, $parser, false, 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 897 of file CoreParserFunctions.php.

References $code, $lang, LanguageCode\bcp47(), and Language\fetchLanguageName().

◆ lc()

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

Definition at line 206 of file CoreParserFunctions.php.

References $parser, and $s.

◆ lcfirst()

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

Definition at line 193 of file CoreParserFunctions.php.

References $parser, and $s.

◆ localurl()

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

Definition at line 219 of file CoreParserFunctions.php.

References $s.

◆ localurle()

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

Definition at line 223 of file CoreParserFunctions.php.

References $s.

◆ matchAgainstMagicword()

static CoreParserFunctions::matchAgainstMagicword ( MagicWordFactory  $magicWordFactory,
  $magicword,
  $value 
)
staticprivate

Matches the given value against the value of given magic word.

Parameters
MagicWordFactory$magicWordFactoryA factory to get the word from, e.g., from $parser->getMagicWordFactory()
string$magicwordMagic word key
string$valueValue to match
Returns
bool True on successful match

Definition at line 475 of file CoreParserFunctions.php.

References $value, and MagicWordFactory\get().

◆ 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: function name changed to "mwnamespace" rather than "namespace" to not break PHP 5.3.

Parameters
Parser$parser
string | null$title
Returns
mixed|string

Definition at line 567 of file CoreParserFunctions.php.

References $t, $title, and Title\newFromText().

◆ namespacee()

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

Definition at line 575 of file CoreParserFunctions.php.

References $t, $title, Title\newFromText(), and wfUrlencode().

◆ namespacenumber()

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

Definition at line 583 of file CoreParserFunctions.php.

References $t, $title, and Title\newFromText().

◆ ns()

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

Definition at line 132 of file CoreParserFunctions.php.

References $parser, and false.

◆ nse()

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

Definition at line 145 of file CoreParserFunctions.php.

References $parser, $ret, and wfUrlencode().

◆ numberingroup()

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

Definition at line 550 of file CoreParserFunctions.php.

References $name, $parser, and SiteStats\numberingroup().

◆ numberofactiveusers()

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

Definition at line 518 of file CoreParserFunctions.php.

References $parser, and SiteStats\activeUsers().

◆ numberofadmins()

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

Definition at line 530 of file CoreParserFunctions.php.

References $parser, and SiteStats\numberingroup().

◆ numberofarticles()

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

Definition at line 522 of file CoreParserFunctions.php.

References $parser, and SiteStats\articles().

◆ numberofedits()

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

Definition at line 538 of file CoreParserFunctions.php.

References $parser, and SiteStats\edits().

◆ numberoffiles()

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

Definition at line 526 of file CoreParserFunctions.php.

References $parser, and SiteStats\images().

◆ numberofpages()

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

Definition at line 510 of file CoreParserFunctions.php.

References $parser, and SiteStats\pages().

◆ numberofusers()

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

Definition at line 514 of file CoreParserFunctions.php.

References $parser, 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 913 of file CoreParserFunctions.php.

References $parser.

◆ padleft()

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

Definition at line 946 of file CoreParserFunctions.php.

References $parser.

◆ padright()

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

Definition at line 950 of file CoreParserFunctions.php.

References $parser.

◆ 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 1173 of file CoreParserFunctions.php.

References $parser, $t, $title, Title\newFromText(), and null.

◆ 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 630 of file CoreParserFunctions.php.

References $t, $title, Title\newFromText(), and wfEscapeWikiText().

◆ pagenamee()

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

Definition at line 638 of file CoreParserFunctions.php.

References $t, $title, Title\newFromText(), and wfEscapeWikiText().

◆ pagesincategory()

static CoreParserFunctions::pagesincategory (   $parser,
  $name = '',
  $arg1 = null,
  $arg2 = null 
)
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 | null$arg1
string | null$arg2
Returns
string

Definition at line 752 of file CoreParserFunctions.php.

References $cache, $magicWords, $name, $parser, $title, $type, Title\makeTitleSafe(), Category\newFromTitle(), NS_CATEGORY, null, and title.

◆ pagesinnamespace()

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

Definition at line 542 of file CoreParserFunctions.php.

References $parser, 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 818 of file CoreParserFunctions.php.

References $parser, $rev, $title, Title\newFromText(), and null.

◆ 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 356 of file CoreParserFunctions.php.

References $parser.

◆ 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 873 of file CoreParserFunctions.php.

References $parser, $title, $type, and Title\newFromText().

◆ 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 847 of file CoreParserFunctions.php.

References $parser, $title, $type, and Title\newFromText().

◆ register()

static CoreParserFunctions::register (   $parser)
static
Parameters
Parser$parser
Returns
void

Definition at line 34 of file CoreParserFunctions.php.

References $parser, $wgAllowDisplayTitle, $wgAllowSlowParserFunctions, as, Parser\SFH_NO_HASH, and Parser\SFH_OBJECT_ARGS.

Referenced by Parser\firstCallInit().

◆ 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 1235 of file CoreParserFunctions.php.

References $parser, $rev, $t, $title, format, MWTimestamp\getLocalInstance(), and Title\newFromText().

◆ 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 1252 of file CoreParserFunctions.php.

References $parser, $rev, $t, $title, format, MWTimestamp\getLocalInstance(), and Title\newFromText().

◆ 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 1218 of file CoreParserFunctions.php.

References $parser, $rev, $t, $title, and Title\newFromText().

◆ 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 1269 of file CoreParserFunctions.php.

References $parser, $rev, $t, $title, format, MWTimestamp\getLocalInstance(), and Title\newFromText().

◆ 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 1286 of file CoreParserFunctions.php.

References $parser, $rev, $t, $title, format, MWTimestamp\getLocalInstance(), and Title\newFromText().

◆ 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 1320 of file CoreParserFunctions.php.

References $parser, $rev, $t, $title, format, MWTimestamp\getLocalInstance(), and Title\newFromText().

◆ 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 1337 of file CoreParserFunctions.php.

References $parser, $rev, $t, $title, and Title\newFromText().

◆ 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 1303 of file CoreParserFunctions.php.

References $parser, $rev, $t, $title, format, MWTimestamp\getLocalInstance(), and Title\newFromText().

◆ rootpagename()

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

Definition at line 678 of file CoreParserFunctions.php.

References $t, $title, Title\newFromText(), and wfEscapeWikiText().

◆ rootpagenamee()

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

Definition at line 686 of file CoreParserFunctions.php.

References $t, $title, Title\newFromText(), wfEscapeWikiText(), and wfUrlencode().

◆ special()

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

◆ speciale()

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

Definition at line 978 of file CoreParserFunctions.php.

References $parser, and wfUrlencode().

◆ subjectpagename()

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

Definition at line 726 of file CoreParserFunctions.php.

References $t, $title, Title\newFromText(), and wfEscapeWikiText().

◆ subjectpagenamee()

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

Definition at line 734 of file CoreParserFunctions.php.

References $t, $title, Title\newFromText(), and wfEscapeWikiText().

◆ subjectspace()

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

Definition at line 607 of file CoreParserFunctions.php.

References $t, $title, and Title\newFromText().

◆ subjectspacee()

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

Definition at line 615 of file CoreParserFunctions.php.

References $t, $title, Title\newFromText(), and wfUrlencode().

◆ subpagename()

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

Definition at line 662 of file CoreParserFunctions.php.

References $t, $title, Title\newFromText(), and wfEscapeWikiText().

◆ subpagenamee()

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

Definition at line 670 of file CoreParserFunctions.php.

References $t, $title, Title\newFromText(), 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 1073 of file CoreParserFunctions.php.

References $args, $name, $params, $parser, $value, as, null, and PPFrame\STRIP_COMMENTS.

◆ talkpagename()

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

Definition at line 710 of file CoreParserFunctions.php.

References $t, $title, Title\newFromText(), and wfEscapeWikiText().

◆ talkpagenamee()

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

Definition at line 718 of file CoreParserFunctions.php.

References $t, $title, Title\newFromText(), and wfEscapeWikiText().

◆ talkspace()

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

Definition at line 591 of file CoreParserFunctions.php.

References $t, $title, and Title\newFromText().

◆ talkspacee()

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

Definition at line 599 of file CoreParserFunctions.php.

References $t, $title, Title\newFromText(), and wfUrlencode().

◆ uc()

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

Definition at line 215 of file CoreParserFunctions.php.

References $parser, and $s.

◆ ucfirst()

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

Definition at line 197 of file CoreParserFunctions.php.

References $parser, and $s.

◆ 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 165 of file CoreParserFunctions.php.

References $magicWords, $parser, $s, and null.

◆ urlFunction()

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

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