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 | /** |
6 | * This is a hook handler interface, see docs/Hooks.md. |
7 | * Use the hook name "CanonicalNamespaces" to register handlers implementing this interface. |
8 | * |
9 | * @stable to implement |
10 | * @ingroup Hooks |
11 | */ |
12 | interface CanonicalNamespacesHook { |
13 | /** |
14 | * Use this hook to add namespaces or alter the defaults. |
15 | * Note that if you need to specify namespace protection or content model for |
16 | * a namespace that is added in a CanonicalNamespaces hook handler, you |
17 | * should do so by altering $wgNamespaceProtection and |
18 | * $wgNamespaceContentModels outside the handler, in top-level scope. The |
19 | * point at which the CanonicalNamespaces hook fires is too late for altering |
20 | * these variables. This applies even if the namespace addition is |
21 | * conditional; it is permissible to declare a content model and protection |
22 | * for a namespace and then decline to actually register it. |
23 | * |
24 | * @since 1.35 |
25 | * |
26 | * @param string[] &$namespaces Array of namespace numbers with corresponding canonical names |
27 | * @return bool|void True or no return value to continue or false to abort |
28 | */ |
29 | public function onCanonicalNamespaces( &$namespaces ); |
30 | } |