MediaWiki  1.28.1
ApiErrorFormatter_BackCompat Class Reference

Format errors and warnings in the old style, for backwards compatibility. More...

Inheritance diagram for ApiErrorFormatter_BackCompat:
Collaboration diagram for ApiErrorFormatter_BackCompat:

Public Member Functions

 __construct (ApiResult $result)
 
 arrayFromStatus (Status $status, $type= 'error', $format=null)
 
- 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. More...
 
 addMessagesFromStatus ($moduleName, Status $status, $types=[ 'warning', 'error'])
 Add warnings and errors from a Status object to the result. More...
 
 addWarning ($moduleName, $msg, $code=null, $data=null)
 Add a warning to the result. More...
 
 arrayFromStatus (Status $status, $type= 'error', $format=null)
 Format messages from a Status as an array. More...
 

Protected Member Functions

 addWarningOrError ($tag, $moduleName, $msg)
 
- Protected Member Functions inherited from ApiErrorFormatter
 addWarningOrError ($tag, $moduleName, $msg)
 Actually add the warning or error to the result. More...
 
 getDummyTitle ()
 Fetch a dummy title to set on Messages. More...
 

Additional Inherited Members

- Protected Attributes inherited from ApiErrorFormatter
 $format = 'none'
 
Language $lang
 
ApiResult $result
 
 $useDB = false
 

Detailed Description

Format errors and warnings in the old style, for backwards compatibility.

Since
1.25
Deprecated:
Only for backwards compatibility, do not use

Definition at line 236 of file ApiErrorFormatter.php.

Constructor & Destructor Documentation

ApiErrorFormatter_BackCompat::__construct ( ApiResult  $result)
Parameters
ApiResult$resultInto which data will be added

Definition at line 242 of file ApiErrorFormatter.php.

References Language\factory().

Member Function Documentation

ApiErrorFormatter_BackCompat::addWarningOrError (   $tag,
  $moduleName,
  $msg 
)
protected
ApiErrorFormatter_BackCompat::arrayFromStatus ( Status  $status,
  $type = 'error',
  $format = null 
)

The documentation for this class was generated from the following file: