MediaWiki  1.32.5
ApiSerializable Interface Reference

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

Inheritance diagram for ApiSerializable:

Public Member Functions

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

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.
Since
1.25

Definition at line 35 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: