41 if ( is_array( $msg ) ) {
43 if ( isset( $msg[
'message'] ) ) {
44 if ( isset( $msg[
'params'] ) ) {
45 $msg = array_merge( [ $msg[
'message'] ], $msg[
'params'] );
47 $msg = [ $msg[
'message'] ];
75 if ( $msg instanceof
Message ) {
76 foreach ( get_class_vars( get_class( $this ) ) as
$key =>
$value ) {
77 if ( isset( $msg->$key ) ) {
78 $this->
$key = $msg->$key;
81 } elseif ( is_array( $msg ) ) {
82 $key = array_shift( $msg );
83 parent::__construct(
$key, $msg );
85 parent::__construct( $msg );
Extension of Message implementing IApiMessage.
static create( $msg, $code=null, array $data=null)
Create an IApiMessage for the message.
__construct( $msg, $code=null, array $data=null)
Extension of RawMessage implementing IApiMessage.
The Message class provides methods which fulfil two basic services:
string $key
The message key.
Variant of the Message class.
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that probably a stub it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output modifiable & $code
trait ApiMessageTrait
Trait to implement the IApiMessage interface for Message subclasses.
Interface for messages with machine-readable data for use by the API.
setApiCode( $code, array $data=null)
Sets the machine-readable code for use by the API.
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))