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\Hook; |
4 | |
5 | use MediaWiki\Title\Title; |
6 | |
7 | /** |
8 | * This is a hook handler interface, see docs/Hooks.md. |
9 | * Use the hook name "SpecialRandomGetRandomTitle" to register handlers implementing this interface. |
10 | * |
11 | * @stable to implement |
12 | * @ingroup Hooks |
13 | */ |
14 | interface SpecialRandomGetRandomTitleHook { |
15 | /** |
16 | * This hook is called during the execution of Special:Random, |
17 | * |
18 | * Use this to change some selection criteria or substitute a different title. |
19 | * |
20 | * @since 1.35 |
21 | * |
22 | * @param string &$randstr The random number from wfRandom() |
23 | * @param bool &$isRedir Boolean, whether to select a redirect or non-redirect |
24 | * @param int[] &$namespaces An array of namespace indexes to get the title from |
25 | * @param array &$extra An array of extra SQL statements |
26 | * @param Title &$title If the hook returns false, a Title object to use instead of the |
27 | * result from the normal query |
28 | * @return bool|void True or no return value to continue or false to abort |
29 | */ |
30 | public function onSpecialRandomGetRandomTitle( &$randstr, &$isRedir, |
31 | &$namespaces, &$extra, &$title |
32 | ); |
33 | } |