| ApiBeforeMain | |
|---|---|
| Available fromversion 1.23.0 (Gerrit change 100996) Occurs before ApiMain's execute is called to process the request. | |
| Define function: | publicstaticfunctiononApiBeforeMain(&$main){...} |
| Attach hook: | Inextension.json:{"Hooks":{"ApiBeforeMain":"MediaWiki\\Extension\\MyExtension\\Hooks::onApiBeforeMain"}} |
| Called from: | File(s):../api.php |
| Interface: | ApiBeforeMainHook.php |
For more information about attaching hooks, seeManual:Hooks.
For examples of extensions using this hook, seeCategory:ApiBeforeMain extensions.