Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
6 / 6 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| WikibaseLexemeEntitySenseLibrary | |
100.00% |
6 / 6 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| register | |
100.00% |
6 / 6 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace Wikibase\Lexeme\MediaWiki\Scribunto; |
| 4 | |
| 5 | /** |
| 6 | * @license GPL-2.0-or-later |
| 7 | */ |
| 8 | class WikibaseLexemeEntitySenseLibrary extends WikibaseLexemeAbstractEntityLibrary { |
| 9 | |
| 10 | /** |
| 11 | * Register the mw.wikibase.lexeme.entity.sense.lua library. |
| 12 | * |
| 13 | * @inheritDoc |
| 14 | */ |
| 15 | public function register() { |
| 16 | // These functions will be exposed to the Lua module. |
| 17 | // They are member functions on a Lua table which is private to the module, thus |
| 18 | // these can't be called from user code, unless explicitly exposed in Lua. |
| 19 | $lib = [ |
| 20 | 'addAllUsage' => [ $this, 'addAllUsage' ], |
| 21 | ]; |
| 22 | |
| 23 | return $this->getEngine()->registerInterface( |
| 24 | __DIR__ . '/mw.wikibase.lexeme.entity.sense.lua', $lib, [] |
| 25 | ); |
| 26 | } |
| 27 | |
| 28 | } |