MediaWiki
1.30.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 198 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 246 of file ApiMessage.php.
References $code, $value, as, and 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 212 of file ApiMessage.php.
References $code.
Referenced by 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\getDiffContent(), ApiBase\getErrorFromStatus(), ApiErrorFormatter\getMessageFromException(), ApiUpload\handleStashException(), ApiUsageException\newWithMessage(), TitleBlacklistHooks\onMovePageCheckPermissions(), ApiBase\parseMsgInternal(), ApiQueryRevisions\run(), ApiMessageTest\testApiMessageCreate(), ApiBaseTest\testErrorArrayToStatus(), TitleBlacklistHooks\testUserName(), TitleBlacklistHooks\userCan(), and ApiBase\validateLimit().