Manual:Hooks/ParserGetVariableValueSwitch

ParserGetVariableValueSwitch is the hook responsible for assigning a value to custom variables. Whenever the parser sees a string like, it assumes that it represents one of three possible kinds of wiki markup: a template, a variable, or a parser function. If XXX is registered as a variable id, the parser runs the hooks assigned to ParserGetVariableValueSwitch until it finds one that can return a value for the variable.

See also:
 * Extension:Variables - provides an example using this hook, as well as sample code for registering variable ids
 * Parser.php - contains the code invoking this hook