Manual:Hooks/WebRequestPathInfoRouter

WebRequestPathInfoRouter
Available from version 1.19.0 (r104689, codereview)
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.php
Interface: WebRequestPathInfoRouterHook.php

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


Details edit

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.