MediaWiki
1.34.0
|
Extension of Message implementing IApiMessage. More...
Public Member Functions | |
__construct ( $msg, $code=null, array $data=null) | |
Public Member Functions inherited from IApiMessage | |
getApiCode () | |
Returns a machine-readable code for use by the API. More... | |
getApiData () | |
Returns additional machine-readable data about the error condition. More... | |
setApiCode ( $code, array $data=null) | |
Sets the machine-readable code for use by the API. More... | |
setApiData (array $data) | |
Sets additional machine-readable data about the error condition. More... | |
Public Member Functions inherited from MessageSpecifier | |
getKey () | |
Returns the message key. More... | |
getParams () | |
Returns the message parameters. More... | |
Static Public Member Functions | |
static | create ( $msg, $code=null, array $data=null) |
Create an IApiMessage for the message. More... | |
Extension of Message implementing IApiMessage.
Definition at line 26 of file ApiMessage.php.
ApiMessage::__construct | ( | $msg, | |
$code = null , |
|||
array | $data = null |
||
) |
Message | string | array | $msg |
|
string | null | $code | |
array | null | $data |
Definition at line 74 of file ApiMessage.php.
References IApiMessage\setApiCode().
|
static |
Create an IApiMessage for the message.
This returns $msg if it's an IApiMessage, calls 'new ApiRawMessage' if $msg is a RawMessage, or calls 'new ApiMessage' in all other cases.
Message | RawMessage | array | string | $msg | |
string | null | $code | |
array | null | $data |
Definition at line 40 of file ApiMessage.php.
Referenced by ApiBase\addBlockInfoToStatus(), ApiErrorFormatter\addError(), ApiErrorFormatter\addMessagesFromStatus(), ApiErrorFormatter\addWarning(), ApiErrorFormatter_BackCompat\arrayFromStatus(), SpecialPageLanguage\changePageLanguage(), ApiUpload\checkVerification(), ApiUpload\dieRecoverableError(), ApiUpload\dieStatusWithCode(), ApiBase\errorArrayToStatus(), ApiMain\errorMessagesFromException(), ApiImageRotate\execute(), ApiEditPage\execute(), ApiParse\execute(), ApiFeedWatchlist\execute(), ApiAuthManagerHelper\formatAuthenticationResponse(), ApiErrorFormatter\formatMessage(), ApiUsageException\getApiMessage(), ApiComparePages\getDiffRevision(), ApiErrorFormatter\getMessageFromException(), ApiUpload\handleStashException(), ApiUsageException\newWithMessage(), TitleBlacklistHooks\onMovePageCheckPermissions(), TitleBlacklistHooks\onUserCan(), ApiTag\processIndividual(), ApiQueryRevisions\run(), TitleBlacklistHooks\testUserName(), and ApiBase\validateLimit().