MediaWiki REL1_39
MediaWiki\Rest\Validator\JsonBodyValidator Class Reference

Do-nothing body validator. More...

Inheritance diagram for MediaWiki\Rest\Validator\JsonBodyValidator:
Collaboration diagram for MediaWiki\Rest\Validator\JsonBodyValidator:

Public Member Functions

 __construct (array $bodyParamSettings)
 
 validateBody (RequestInterface $request)
 Validate the body of a request.
 

Detailed Description

Do-nothing body validator.

Definition at line 14 of file JsonBodyValidator.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Rest\Validator\JsonBodyValidator::__construct ( array $bodyParamSettings)
Parameters
array[]$bodyParamSettings

Definition at line 24 of file JsonBodyValidator.php.

Member Function Documentation

◆ validateBody()

MediaWiki\Rest\Validator\JsonBodyValidator::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().

Parameters
RequestInterface$request
Returns
mixed
Exceptions
HttpExceptionon validation failure

Implements MediaWiki\Rest\Validator\BodyValidator.

Definition at line 28 of file JsonBodyValidator.php.

References MediaWiki\Rest\RequestInterface\getBody().


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