Manual:Hooks/ParserTestParser

From mediawiki.org
ParserTestParser
Available from version 1.6.0
called when creating a new instance of Parser for parser tests
Define function:
public static function onParserTestParser( $parser ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"ParserTestParser": "MediaWiki\\Extension\\MyExtension\\Hooks::onParserTestParser"
	}
}
Called from: File(s): ../tests/parser/ParserTestRunner.php
Interface: ParserTestParserHook.php

For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:ParserTestParser extensions.

Details[edit]

  • $parser: Parser object created