Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| ScribuntoHooks | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
| onScribuntoExternalLibraries | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
6 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Extension\FlaggedRevs\Backend; |
| 4 | |
| 5 | use FlaggedRevsScribuntoLuaLibrary; |
| 6 | use MediaWiki\Extension\Scribunto\Hooks\ScribuntoExternalLibrariesHook; |
| 7 | |
| 8 | /** |
| 9 | * Class containing hooked functions for a FlaggedRevs environment |
| 10 | * All hooks from the Scribunto extension which is optional to use with this extension. |
| 11 | */ |
| 12 | class ScribuntoHooks implements |
| 13 | ScribuntoExternalLibrariesHook |
| 14 | { |
| 15 | |
| 16 | /** |
| 17 | * @see https://www.mediawiki.org/wiki/Manual:Hooks/ScribuntoExternalLibraries |
| 18 | * |
| 19 | * @param string $engine |
| 20 | * @param array &$extraLibraries |
| 21 | */ |
| 22 | public function onScribuntoExternalLibraries( string $engine, array &$extraLibraries ): void { |
| 23 | if ( $engine == 'lua' ) { |
| 24 | $extraLibraries['mw.ext.FlaggedRevs'] = FlaggedRevsScribuntoLuaLibrary::class; |
| 25 | } |
| 26 | } |
| 27 | } |