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 Wikimedia\Rdbms\IDatabase; |
6 | |
7 | /** |
8 | * This is a hook handler interface, see docs/Hooks.md. |
9 | * Use the hook name "DeleteUnknownPreferences" to register handlers implementing this interface. |
10 | * |
11 | * @stable to implement |
12 | * @ingroup Hooks |
13 | */ |
14 | interface DeleteUnknownPreferencesHook { |
15 | /** |
16 | * This hook is called by the cleanupPreferences.php maintenance script |
17 | * to build a WHERE clause with which to delete preferences that are not |
18 | * known about. This hook is used by extensions that have dynamically-named |
19 | * preferences that should not be deleted in the usual cleanup process. |
20 | * For example, the Gadgets extension creates preferences prefixed with |
21 | * 'gadget-', so anything with that prefix is excluded from the deletion. |
22 | * |
23 | * @since 1.35 |
24 | * |
25 | * @param array &$where Array that will be passed as the $cond parameter to |
26 | * IDatabase::select() to determine what will be deleted from the user_properties |
27 | * table |
28 | * @param IDatabase $db IDatabase object, useful for accessing $db->buildLike() etc. |
29 | * @return bool|void True or no return value to continue or false to abort |
30 | */ |
31 | public function onDeleteUnknownPreferences( &$where, $db ); |
32 | } |