Manual:Hooks/ParserTestParser

From mediawiki.org
Jump to navigation Jump to search
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": "MyExtensionHooks::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