Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
HookRunner | n/a |
0 / 0 |
n/a |
0 / 0 |
9 | n/a |
0 / 0 |
|||
__construct | n/a |
0 / 0 |
n/a |
0 / 0 |
1 | |||||
onResourceLoaderExcludeUserOptions | n/a |
0 / 0 |
n/a |
0 / 0 |
1 | |||||
onResourceLoaderForeignApiModules | n/a |
0 / 0 |
n/a |
0 / 0 |
1 | |||||
onResourceLoaderModifyEmbeddedSourceUrls | n/a |
0 / 0 |
n/a |
0 / 0 |
1 | |||||
onResourceLoaderRegisterModules | n/a |
0 / 0 |
n/a |
0 / 0 |
1 | |||||
onResourceLoaderSiteModulePages | n/a |
0 / 0 |
n/a |
0 / 0 |
1 | |||||
onResourceLoaderSiteStylesModulePages | n/a |
0 / 0 |
n/a |
0 / 0 |
1 | |||||
onResourceLoaderGetConfigVars | n/a |
0 / 0 |
n/a |
0 / 0 |
1 | |||||
onResourceLoaderJqueryMsgModuleMagicWords | n/a |
0 / 0 |
n/a |
0 / 0 |
1 |
1 | <?php |
2 | |
3 | namespace MediaWiki\ResourceLoader; |
4 | |
5 | use MediaWiki\Config\Config; |
6 | use MediaWiki\HookContainer\HookContainer; |
7 | |
8 | /** |
9 | * @internal |
10 | * @codeCoverageIgnore |
11 | * @ingroup ResourceLoader |
12 | */ |
13 | class HookRunner implements |
14 | \MediaWiki\ResourceLoader\Hook\ResourceLoaderExcludeUserOptionsHook, |
15 | \MediaWiki\ResourceLoader\Hook\ResourceLoaderForeignApiModulesHook, |
16 | \MediaWiki\ResourceLoader\Hook\ResourceLoaderModifyEmbeddedSourceUrlsHook, |
17 | \MediaWiki\ResourceLoader\Hook\ResourceLoaderRegisterModulesHook, |
18 | \MediaWiki\ResourceLoader\Hook\ResourceLoaderSiteModulePagesHook, |
19 | \MediaWiki\ResourceLoader\Hook\ResourceLoaderSiteStylesModulePagesHook, |
20 | \MediaWiki\ResourceLoader\Hook\ResourceLoaderGetConfigVarsHook, |
21 | \MediaWiki\ResourceLoader\Hook\ResourceLoaderJqueryMsgModuleMagicWordsHook |
22 | { |
23 | /** @var HookContainer */ |
24 | private $container; |
25 | |
26 | public function __construct( HookContainer $container ) { |
27 | $this->container = $container; |
28 | } |
29 | |
30 | public function onResourceLoaderExcludeUserOptions( array &$keysToExclude, Context $context ): void { |
31 | $this->container->run( |
32 | 'ResourceLoaderExcludeUserOptions', |
33 | [ &$keysToExclude, $context ], |
34 | [ 'abortable' => false ] |
35 | ); |
36 | } |
37 | |
38 | public function onResourceLoaderForeignApiModules( &$dependencies, $context ): void { |
39 | $this->container->run( |
40 | 'ResourceLoaderForeignApiModules', |
41 | [ &$dependencies, $context ], |
42 | [ 'abortable' => false ] |
43 | ); |
44 | } |
45 | |
46 | public function onResourceLoaderModifyEmbeddedSourceUrls( array &$urls ): void { |
47 | $this->container->run( |
48 | 'ResourceLoaderModifyEmbeddedSourceUrls', |
49 | [ &$urls ], |
50 | [ 'abortable' => false ] |
51 | ); |
52 | } |
53 | |
54 | public function onResourceLoaderRegisterModules( ResourceLoader $rl ): void { |
55 | $this->container->run( |
56 | 'ResourceLoaderRegisterModules', |
57 | [ $rl ], |
58 | [ 'abortable' => false ] |
59 | ); |
60 | } |
61 | |
62 | public function onResourceLoaderSiteModulePages( $skin, array &$pages ): void { |
63 | $this->container->run( |
64 | 'ResourceLoaderSiteModulePages', |
65 | [ $skin, &$pages ], |
66 | [ 'abortable' => false ] |
67 | ); |
68 | } |
69 | |
70 | public function onResourceLoaderSiteStylesModulePages( $skin, array &$pages ): void { |
71 | $this->container->run( |
72 | 'ResourceLoaderSiteStylesModulePages', |
73 | [ $skin, &$pages ], |
74 | [ 'abortable' => false ] |
75 | ); |
76 | } |
77 | |
78 | public function onResourceLoaderGetConfigVars( array &$vars, $skin, Config $config ): void { |
79 | $this->container->run( |
80 | 'ResourceLoaderGetConfigVars', |
81 | [ &$vars, $skin, $config ], |
82 | [ 'abortable' => false ] |
83 | ); |
84 | } |
85 | |
86 | public function onResourceLoaderJqueryMsgModuleMagicWords( Context $context, |
87 | array &$magicWords |
88 | ): void { |
89 | $this->container->run( |
90 | 'ResourceLoaderJqueryMsgModuleMagicWords', |
91 | [ $context, &$magicWords ], |
92 | [ 'abortable' => false ] |
93 | ); |
94 | } |
95 | } |