Manual:Hooks/ApiQueryBaseAfterQuery

ApiQueryBaseAfterQuery
Available from version 1.28.0 (Gerrit change 313830)
Called for (some) API query modules after the database query has returned.
Define function:
public static function onApiQueryBaseAfterQuery( $module, $result, &$hookData ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"ApiQueryBaseAfterQuery": "MyExtensionHooks::onApiQueryBaseAfterQuery"
	}
}
Called from:File(s): api/ApiQueryBase.php
Function(s): select
Interface:ApiQueryBaseAfterQueryHook.php

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

Called for (some) API query modules after the database query has returned. An API query module wanting to use this hook should see the ApiQueryBase::select() and ApiQueryBase::processRow() documentation.

DetailsEdit

  • $module: ApiQueryBase module in question
  • $result: ResultWrapper|bool returned from the IDatabase::select()
  • &$hookData: array that was passed to the ApiQueryBaseBeforeQuery hook and will be passed to the ApiQueryBaseProcessRow hook, intended for inter-hook communication.