MediaWiki REL1_35
|
Wrapper for ParamValidator. More...
Public Member Functions | |
__construct (ObjectFactory $objectFactory, PermissionManager $permissionManager, RequestInterface $request, UserIdentity $user) | |
validateBody (RequestInterface $request, Handler $handler) | |
Validate the body of a request. | |
validateParams (array $paramSettings) | |
Validate parameters. | |
Private Attributes | |
ParamValidator | $paramValidator |
Wrapper for ParamValidator.
It's intended to be used in the REST API classes by composition.
Definition at line 31 of file Validator.php.
MediaWiki\Rest\Validator\Validator::__construct | ( | ObjectFactory | $objectFactory, |
PermissionManager | $permissionManager, | ||
RequestInterface | $request, | ||
UserIdentity | $user | ||
) |
ObjectFactory | $objectFactory | |
PermissionManager | $permissionManager | |
RequestInterface | $request | |
UserIdentity | $user |
Definition at line 75 of file Validator.php.
MediaWiki\Rest\Validator\Validator::validateBody | ( | RequestInterface | $request, |
Handler | $handler | ||
) |
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().
RequestInterface | $request | |
Handler | $handler | Used to call getBodyValidator() |
HttpException | on validation failure |
Definition at line 128 of file Validator.php.
References MediaWiki\Rest\RequestInterface\getBody(), MediaWiki\Rest\Handler\getBodyValidator(), MediaWiki\Rest\RequestInterface\getHeaderLine(), and MediaWiki\Rest\RequestInterface\getMethod().
Referenced by MediaWiki\Rest\Handler\validate().
MediaWiki\Rest\Validator\Validator::validateParams | ( | array | $paramSettings | ) |
Validate parameters.
array[] | $paramSettings | Parameter settings |
HttpException | on validaton failure |
Definition at line 96 of file Validator.php.
References Wikimedia\ParamValidator\ValidationException\getFailureMessage(), Wikimedia\ParamValidator\ValidationException\getParamName(), Wikimedia\ParamValidator\ValidationException\getParamValue(), and MediaWiki\Rest\Handler\PARAM_SOURCE.
Referenced by MediaWiki\Rest\Handler\validate().
|
private |
Definition at line 66 of file Validator.php.