MediaWiki REL1_27
|
Format errors and warnings in the old style, for backwards compatibility. More...
Public Member Functions | |
__construct (ApiResult $result) | |
arrayFromStatus (Status $status, $type='error', $format=null) | |
Format messages from a Status as an array. | |
Public Member Functions inherited from ApiErrorFormatter | |
__construct (ApiResult $result, Language $lang, $format, $useDB=false) | |
addError ( $moduleName, $msg, $code=null, $data=null) | |
Add an error to the result. | |
addMessagesFromStatus ( $moduleName, Status $status, $types=[ 'warning', 'error']) | |
Add warnings and errors from a Status object to the result. | |
addWarning ( $moduleName, $msg, $code=null, $data=null) | |
Add a warning to the result. | |
Protected Member Functions | |
addWarningOrError ( $tag, $moduleName, $msg) | |
Actually add the warning or error to the result. | |
Protected Member Functions inherited from ApiErrorFormatter | |
getDummyTitle () | |
Fetch a dummy title to set on Messages. | |
Additional Inherited Members | |
Protected Attributes inherited from ApiErrorFormatter | |
$format = 'none' | |
Language | $lang |
ApiResult | $result |
$useDB = false | |
Format errors and warnings in the old style, for backwards compatibility.
Definition at line 236 of file ApiErrorFormatter.php.
ApiErrorFormatter_BackCompat::__construct | ( | ApiResult | $result | ) |
ApiResult | $result | Into which data will be added |
Definition at line 242 of file ApiErrorFormatter.php.
|
protected |
Actually add the warning or error to the result.
string | $tag | 'warning' or 'error' |
string | $moduleName | |
ApiMessage | ApiRawMessage | $msg |
Reimplemented from ApiErrorFormatter.
Definition at line 267 of file ApiErrorFormatter.php.
References $code, ApiBase\$messageMap, $path, $tag, $value, ApiResult\ADD_ON_TOP, ApiResult\NO_SIZE_CHECK, and ApiResult\OVERRIDE.
ApiErrorFormatter_BackCompat::arrayFromStatus | ( | Status | $status, |
$type = 'error' , |
|||
$format = null |
|||
) |
Format messages from a Status as an array.
Status | $status | |
string | $type | 'warning' or 'error' |
string | null | $format |
Reimplemented from ApiErrorFormatter.
Definition at line 246 of file ApiErrorFormatter.php.
References ApiErrorFormatter\$result, $status, $type, as, and ApiResult\setIndexedTagName().