Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | namespace MediaWiki\User\Hook; |
4 | |
5 | use MediaWiki\User\User; |
6 | |
7 | /** |
8 | * This is a hook handler interface, see docs/Hooks.md. |
9 | * Use the hook name "PingLimiter" to register handlers implementing this interface. |
10 | * |
11 | * @stable to implement |
12 | * @ingroup Hooks |
13 | */ |
14 | interface PingLimiterHook { |
15 | /** |
16 | * Use this hook to override the results of User::pingLimiter(). |
17 | * |
18 | * @since 1.35 |
19 | * |
20 | * @param User $user User performing the action |
21 | * @param string $action Action being performed |
22 | * @param bool &$result Whether or not the action should be prevented |
23 | * Change $result and return false to give a definitive answer, otherwise |
24 | * the built-in rate limiting checks are used, if enabled. |
25 | * @param int $incrBy Amount to increment counter by |
26 | * @return bool|void True or no return value to continue or false to abort |
27 | */ |
28 | public function onPingLimiter( $user, $action, &$result, $incrBy ); |
29 | } |