MediaWiki  master
CoreMagicVariables Class Reference

Expansions of core magic variables, used by the parser. More...

Static Public Member Functions

static expand (Parser $parser, string $id, int $ts, NamespaceInfo $nsInfo, ServiceOptions $svcOptions, LoggerInterface $logger)
 Expand the magic variable given by $index. More...
 

Static Private Member Functions

static getRevisionTimestampSubstring (Parser $parser, LoggerInterface $logger, int $start, int $len, int $mtts, string $variable)
 
static setOutputFlag (Parser $parser, LoggerInterface $logger, string $flag, string $reason)
 Helper method borrowed from Parser.php: sets the flag on the output but also does some debug logging. More...
 

Detailed Description

Expansions of core magic variables, used by the parser.

Definition at line 31 of file CoreMagicVariables.php.

Member Function Documentation

◆ expand()

◆ getRevisionTimestampSubstring()

static CoreMagicVariables::getRevisionTimestampSubstring ( Parser  $parser,
LoggerInterface  $logger,
int  $start,
int  $len,
int  $mtts,
string  $variable 
)
staticprivate
Parameters
Parser$parser
LoggerInterface$logger
int$start
int$len
int$mttsMax time-till-save; sets vary-revision-timestamp if result changes by then
string$variableParser variable name
Returns
string

Definition at line 325 of file CoreMagicVariables.php.

References Parser\getContentLanguage(), Parser\getRevisionRecordObject(), Parser\getRevisionTimestamp(), setOutputFlag(), and wfTimestamp().

Referenced by expand().

◆ setOutputFlag()

static CoreMagicVariables::setOutputFlag ( Parser  $parser,
LoggerInterface  $logger,
string  $flag,
string  $reason 
)
staticprivate

Helper method borrowed from Parser.php: sets the flag on the output but also does some debug logging.

Parameters
Parser$parser
LoggerInterface$logger
string$flag
string$reason

Definition at line 365 of file CoreMagicVariables.php.

References Parser\getOutput(), and Parser\getTitle().

Referenced by expand(), and getRevisionTimestampSubstring().


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