Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
ScribuntoHooks
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
6
0.00% covered (danger)
0.00%
0 / 1
 onScribuntoExternalLibraries
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
6
1<?php
2
3namespace MediaWiki\Extension\TitleBlacklist;
4
5use MediaWiki\Extension\Scribunto\Hooks\ScribuntoExternalLibrariesHook;
6
7/**
8 * Hooks from Scribunto extension,
9 * which is optional to use with this extension.
10 *
11 * @ingroup Extensions
12 */
13class ScribuntoHooks implements ScribuntoExternalLibrariesHook {
14
15    /**
16     * External Lua library for Scribunto
17     *
18     * @param string $engine
19     * @param array &$extraLibraries
20     */
21    public function onScribuntoExternalLibraries( string $engine, array &$extraLibraries ) {
22        if ( $engine === 'lua' ) {
23            $extraLibraries['mw.ext.TitleBlacklist'] = LuaTitleBlacklistLibrary::class;
24        }
25    }
26}