Jump to navigation Jump to search
Available from version 1.19.0 (r104689)
While building the PathRouter to parse the REQUEST_URI.
Define function:
public static function onWebRequestPathInfoRouter( $router ) { ... }
Attach hook:

In extension.json:

	"Hooks": {
		"WebRequestPathInfoRouter": "MyExtensionHooks::onWebRequestPathInfoRouter"

For MediaWiki ≤1.25:

$wgHooks['WebRequestPathInfoRouter'][] = 'MyExtensionHooks::onWebRequestPathInfoRouter';
Called from:File(s): WebRequest.php

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


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.