4 public function register() {
6 'plain' => [ $this,
'messagePlain' ],
7 'check' => [ $this,
'messageCheck' ],
18 return $this->
getEngine()->registerInterface(
'mw.message.lua', $lib, [
19 'lang' =>
$lang->getCode(),
24 if ( isset( $data[
'rawMessage'] ) ) {
29 $msg->inLanguage( $data[
'lang'] )
30 ->useDatabase( $data[
'useDB'] );
32 $msg->params( array_values( $data[
'params'] ) );
46 return [ $msg->plain() ];
60 if ( !in_array( $what, [
'exists',
'isBlank',
'isDisabled' ] ) ) {
66 return [ call_user_func( [ $msg, $what ] ) ];
static newFallbackSequence(... $keys)
Factory function accepting multiple message keys and returning a message instance for the first messa...
Variant of the Message class.
This class provides some basic services that Lua libraries will probably need.
getEngine()
Get the engine.
getParser()
Get the parser.
messagePlain( $data)
Handler for messagePlain.
messageCheck( $what, $data)
Handler for messageCheck.
makeMessage( $data, $setParams)
if(!isset( $args[0])) $lang