MediaWiki  master
MediaWiki\Rest\Validator\BodyValidator Interface Reference

Interface for validating a request body. More...

Inheritance diagram for MediaWiki\Rest\Validator\BodyValidator:

Public Member Functions

 validateBody (RequestInterface $request)
 Validate the body of a request. More...

Detailed Description

Interface for validating a request body.

Stability: stable
to implement
See also

Definition at line 14 of file BodyValidator.php.

Member Function Documentation

◆ validateBody()

MediaWiki\Rest\Validator\BodyValidator::validateBody ( RequestInterface  $request)

Validate the body of a request.

This may return a data structure representing the parsed body. When used in the context of Handler::validateParams(), the returned value will be available to the handler via Handler::getValidatedBody().

HttpExceptionon validation failure

Implemented in MediaWiki\Rest\Validator\UnsupportedContentTypeBodyValidator, MediaWiki\Rest\Validator\NullBodyValidator, and MediaWiki\Rest\Validator\JsonBodyValidator.

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