MediaWiki master
ApiSerializable Interface Reference

This interface allows for overriding the default conversion applied by ApiResult::validateValue(). More...

Inherited by ApiResult.

Public Member Functions

 serializeForApiResult ()
 Return the value to be added to ApiResult in place of this object.
 

Detailed Description

This interface allows for overriding the default conversion applied by ApiResult::validateValue().

Note
This is currently an informal interface; it need not be explicitly implemented, as long as the method is provided. This allows for extension code to maintain compatibility with older MediaWiki while still taking advantage of this where it exists.
Stability: stable
to implement
Since
1.25

Definition at line 37 of file ApiSerializable.php.

Member Function Documentation

◆ serializeForApiResult()

ApiSerializable::serializeForApiResult ( )

Return the value to be added to ApiResult in place of this object.

The returned value must not be an object, and must pass all checks done by ApiResult::validateValue().

Returns
mixed

Implemented in ApiResult.


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