Manual:Hooks/WebRequestPathInfoRouter

Category:MediaWiki hooks#WebRequestPathInfoRouter Category:Hooks added in MediaWiki 1.19.0#WebRequestPathInfoRouter
WebRequestPathInfoRouter
Available from version 1.19.0 (r104689, CodeReview archive)
While building the PathRouter to parse the REQUEST_URI.
Define function:
public static function onWebRequestPathInfoRouter( $router ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"WebRequestPathInfoRouter": "MediaWiki\\Extension\\MyExtension\\Hooks::onWebRequestPathInfoRouter"
	}
}
Called from: File(s): WebRequest.phpCategory:MediaWiki hooks included in WebRequest.php#WebRequestPathInfoRouter
Interface: WebRequestPathInfoRouterHook.php

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

Details

Allows an extension to extend the extraction of titles from paths.

  • $router: The PathRouter instance

See Manual:Entry point routing for information on how to add new patterns to the PathRouter instance.

Category:Hooks added in MediaWiki 1.19.0 Category:MediaWiki hooks Category:MediaWiki hooks included in WebRequest.php