MediaWiki master
MediaWiki\Api\ApiRestHybrid Interface Reference

Interface for action API modules that also support the REST paradigm. More...

Inherited by MediaWiki\Api\ApiMove, and MediaWiki\Api\ApiQueryBacklinks.

Public Member Functions

 initRestMode (ApiRestHelperContext $context)
 Initiates REST mode and returns the helper object that will act as glue.

Detailed Description

Interface for action API modules that also support the REST paradigm.

This is used as glue by the ActionModuleBasedHandler in the REST framework to help with translating an action API result to a REST response.

Since interfaces can't evolve, the interface has a single method that returns a helper object. The helper object is defined using a base class which can evolve.

Stability: unstable
since 1.47, will become stable to implement

Definition at line 16 of file ApiRestHybrid.php.

Member Function Documentation

◆ initRestMode()

MediaWiki\Api\ApiRestHybrid::initRestMode ( ApiRestHelperContext $context)

Initiates REST mode and returns the helper object that will act as glue.

Api modules that implement this method may use it to trigger a "REST mode", e.g. to change what parameters are allowed.

The ApiRestHelper must provide a response body schema.

Parameters
ApiRestHelperContext$context
Returns
ApiRestHelper

Implemented in MediaWiki\Api\ApiMove, and MediaWiki\Api\ApiQueryBacklinks.


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