Debian Codegraph @

includes/Permissions/Hook/TitleReadWhitelistHook.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\Permissions\Hook;
4
5 use MediaWiki\Title\Title;
6 use MediaWiki\User\User;
7
8 /**
9 * This is a hook handler interface, see docs/Hooks.md.
10 * Use the hook name "TitleReadWhitelist" to register handlers implementing this interface.
11 *
12 * @stable to implement
13 * @ingroup Hooks
14 */
15 interface TitleReadWhitelistHook {
16 /**
17 * This hook is called at the end of read permissions checks, just before
18 * adding the default error message if nothing allows the user to read the page.
19 *
20 * @since 1.35
21 *
22 * @param Title $title Title being checked against
23 * @param User $user Current user
24 * @param bool &$whitelisted Whether this title is whitelisted
25 * @return bool|void True or no return value to continue, or false to *not* whitelist
26 * the title
27 */
28 public function onTitleReadWhitelist( $title, $user, &$whitelisted );
29 }