Open main menu

Manual:Hooks/APIAfterExecute

< Manual:Hooks
APIAfterExecute
Available from version 1.14.0
Use this hook to extend core API modules
Define function:
public static function onAPIAfterExecute( &$module ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"APIAfterExecute": "MyExtensionHooks::onAPIAfterExecute"
	}
}

For MediaWiki ≤1.25:

$wgHooks['APIAfterExecute'][] = 'MyExtensionHooks::onAPIAfterExecute';
Called from:File(s): api/ApiMain.php

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

DetailsEdit

  • $module: Module object

NotesEdit

Called after calling the execute() method of an API module.

Use this to extend core API modules.