*/
class CoreParserFunctions {
/**
- * @param $parser Parser
+ * @param Parser $parser
* @return void
*/
static function register( $parser ) {
}
/**
- * @param $parser Parser
+ * @param Parser $parser
* @param string $part1
* @return array
*/
* 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 object
+ * @param Parser $parser
* @param string $s The text to encode.
* @param string $arg (optional): The type of encoding.
* @return string
}
/**
- * @param $parser Parser
+ * @param Parser $parser
* @param string $s
* @return
*/
}
/**
- * @param $parser Parser
+ * @param Parser $parser
* @param string $s
* @return
*/
}
/**
- * @param $parser Parser
+ * @param Parser $parser
* @param string $num
* @param string $arg
* @return string
}
/**
- * @param $parser Parser
+ * @param Parser $parser
* @param string $case
* @param string $word
* @return
}
/**
- * @param $parser Parser
- * @param $username string
+ * @param Parser $parser
+ * @param string $username
* @return
*/
static function gender( $parser, $username ) {
}
/**
- * @param $parser Parser
+ * @param Parser $parser
* @param string $text
* @return
*/
* 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
- * @return String
+ * @param Parser $parser Parent parser
+ * @param string $text Desired title text
+ * @return string
*/
static function displaytitle( $parser, $text = '' ) {
global $wgRestrictDisplayTitle;
/**
* Matches the given value against the value of given magic word
*
- * @param string $magicword magic word key
- * @param mixed $value value to match
- * @return boolean true on successful match
+ * @param string $magicword Magic word key
+ * @param string $value Value to match
+ * @return bool True on successful match
*/
private static function matchAgainstMagicword( $magicword, $value ) {
$value = trim( strval( $value ) );
/**
* Functions to get and normalize pagenames, corresponding to the magic words
* of the same names
- * @return String
+ * @return string
*/
static function pagename( $parser, $title = null ) {
$t = Title::newFromText( $title );
* 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 $page String Name of page to check (Default: empty string)
- * @param $raw String Should number be human readable with commas or just number
+ * @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
*/
static function pagesize( $parser, $page = '', $raw = null ) {
/**
* 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
+ * @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
*/
static function language( $parser, $code = '', $inLanguage = '' ) {
$code = strtolower( $code );
/**
* 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
*/
static function pad( $parser, $string, $length, $padding = '0', $direction = STR_PAD_RIGHT ) {
}
/**
- * @param $parser Parser
- * @param $text
+ * @param Parser $parser
+ * @param string $text
* @return string
*/
static function anchorencode( $parser, $text ) {
}
/**
- * @param $parser Parser
+ * @param Parser $parser
* @param string $text The sortkey to use
* @param string $uarg Either "noreplace" or "noerror" (in en)
* both suppress errors, and noreplace does nothing if
/**
* Parser function to extension tag adaptor
+ * @param Parser $parser
+ * @param PPFrame $frame
+ * @param array $args
* @return string
*/
public static function tagObj( $parser, $frame, $args ) {
* 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
+ * @param Parser $parser
+ * @param Title $title
* @return Revision
* @since 1.23
*/
/**
* Get the pageid of a specified page
- * @param $parser Parser
- * @param $title string Title to get the pageid from
+ * @param Parser $parser
+ * @param string $title Title to get the pageid from
* @since 1.23
*/
public static function pageid( $parser, $title = null ) {
/**
* Get the id from the last revision of a specified page.
- * @param $parser Parser
- * @param $title string Title to get the id from
+ * @param Parser $parser
+ * @param string $title Title to get the id from
* @since 1.23
*/
public static function revisionid( $parser, $title = null ) {
/**
* Get the day from the last revision of a specified page.
- * @param $parser Parser
- * @param $title string Title to get the day from
+ * @param Parser $parser
+ * @param string $title Title to get the day from
* @since 1.23
*/
public static function revisionday( $parser, $title = null ) {
/**
* Get the day with leading zeros from the last revision of a specified page.
- * @param $parser Parser
- * @param $title string Title to get the day from
+ * @param Parser $parser
+ * @param string $title Title to get the day from
* @since 1.23
*/
public static function revisionday2( $parser, $title = null ) {
/**
* Get the month with leading zeros from the last revision of a specified page.
- * @param $parser Parser
- * @param $title string Title to get the month from
+ * @param Parser $parser
+ * @param string $title Title to get the month from
* @since 1.23
*/
public static function revisionmonth( $parser, $title = null ) {
/**
* Get the month from the last revision of a specified page.
- * @param $parser Parser
- * @param $title string Title to get the month from
+ * @param Parser $parser
+ * @param string $title Title to get the month from
* @since 1.23
*/
public static function revisionmonth1( $parser, $title = null ) {
/**
* Get the year from the last revision of a specified page.
- * @param $parser Parser
- * @param $title string Title to get the year from
+ * @param Parser $parser
+ * @param string $title Title to get the year from
* @since 1.23
*/
public static function revisionyear( $parser, $title = null ) {
/**
* Get the timestamp from the last revision of a specified page.
- * @param $parser Parser
- * @param $title string Title to get the timestamp from
+ * @param Parser $parser
+ * @param string $title Title to get the timestamp from
* @since 1.23
*/
public static function revisiontimestamp( $parser, $title = null ) {
/**
* Get the user from the last revision of a specified page.
- * @param $parser Parser
- * @param $title string Title to get the user from
+ * @param Parser $parser
+ * @param string $title Title to get the user from
* @since 1.23
*/
public static function revisionuser( $parser, $title = null ) {