X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiMessage.php;h=5c3434f95ca5adeb9e42cbd4f45fc2f65cd28b89;hb=23c92cf78866cadc96d9c1e5275e85caab755858;hp=db826a68a6b455170089d36ec8614dc4d7d65021;hpb=d2278d1c2ae98e2c177acdab400614f29ac54591;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiMessage.php b/includes/api/ApiMessage.php index db826a68a6..5c3434f95c 100644 --- a/includes/api/ApiMessage.php +++ b/includes/api/ApiMessage.php @@ -23,6 +23,12 @@ /** * Interface for messages with machine-readable data for use by the API + * + * The idea is that it's a Message that has some extra data for the API to use when interpreting it + * as an error (or, in the future, as a warning). Internals of MediaWiki often use messages (or + * message keys, or Status objects containing messages) to pass information about errors to the user + * (see e.g. Title::getUserPermissionsErrors()) and the API has to make do with that. + * * @since 1.25 * @ingroup API */ @@ -166,7 +172,6 @@ class ApiRawMessage extends RawMessage implements IApiMessage { * - string: passed to RawMessage::__construct * @param string|null $code * @param array|null $data - * @return ApiMessage */ public function __construct( $msg, $code = null, array $data = null ) { if ( $msg instanceof RawMessage ) {