|
MediaWiki master
|
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. | |
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.
Definition at line 16 of file ApiRestHybrid.php.
| 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.
| ApiRestHelperContext | $context |
Implemented in MediaWiki\Api\ApiMove, and MediaWiki\Api\ApiQueryBacklinks.