Merge "Update Vue to 3.5.13"
[mediawiki.git] / includes / api / Hook / ApiQueryCheckCanExecuteHook.php
blobce85c57ce1b74c1e78e30736e3cd936eda2335e7
1 <?php
3 namespace MediaWiki\Api\Hook;
5 use MediaWiki\Api\ApiMessage;
6 use MediaWiki\Api\ApiQueryBase;
7 use MediaWiki\Permissions\Authority;
8 use Wikimedia\Message\MessageSpecifier;
10 /**
11 * This is a hook handler interface, see docs/Hooks.md.
12 * Use the hook name "ApiQueryCheckCanExecute" to register handlers implementing this interface.
14 * @stable to implement
15 * @ingroup Hooks
17 interface ApiQueryCheckCanExecuteHook {
19 /**
20 * This hook is called during at the beginning of ApiQuery::execute and can be used to prevent
21 * execution of query submodules.
23 * @since 1.44
25 * @param ApiQueryBase[] $modules
26 * @param Authority $authority Current user
27 * @param MessageSpecifier|string|array &$message API message to die with.
28 * @return bool|void True or no return value to continue, or false and set a
29 * message to cancel the request
31 * @see ApiMessage::create() for how the $message parameter is interpreted.
32 * @see ApiCheckCanExecuteHook for non-query modules.
34 public function onApiQueryCheckCanExecute( $modules, $authority, &$message );