Manual:Hooks/WebRequestPathInfoRouter
From Linux Web Expert
WebRequestPathInfoRouter | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar (r104689, codereview)</tvar></translate> While building the PathRouter to parse the REQUEST_URI. | |
<translate> Define function:</translate> | public static function onWebRequestPathInfoRouter( $router ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"WebRequestPathInfoRouter": "MediaWiki\\Extension\\MyExtension\\Hooks::onWebRequestPathInfoRouter"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> WebRequest.php |
<translate> Interface:</translate> | WebRequestPathInfoRouterHook.php |
<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:WebRequestPathInfoRouter extensions</tvar>.</translate>
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.