MediaWiki REL1_39
|
Interface defining callbacks needed by ParamValidator. More...
Public Member Functions | |
getUploadedFile ( $name, array $options) | |
Fetch data for a file upload. | |
getValue ( $name, $default, array $options) | |
Fetch a value from the request. | |
hasParam ( $name, array $options) | |
Test if a parameter exists in the request. | |
hasUpload ( $name, array $options) | |
Test if a parameter exists as an upload in the request. | |
recordCondition (DataMessageValue $message, $name, $value, array $settings, array $options) | |
Record non-fatal conditions. | |
useHighLimits (array $options) | |
Indicate whether "high limits" should be used. | |
Interface defining callbacks needed by ParamValidator.
The user of ParamValidator is expected to pass an object implementing this interface to ParamValidator's constructor.
All methods in this interface accept an "options array". This is the same $options
passed to ParamValidator::getValue(), ParamValidator::validateValue(), and the like and is intended for communication of non-global state.
Definition at line 21 of file Callbacks.php.
Wikimedia\ParamValidator\Callbacks::getUploadedFile | ( | $name, | |
array | $options ) |
Fetch data for a file upload.
string | $name | Parameter name of the upload |
array | $options | Options array |
Implemented in MediaWiki\Api\Validator\ApiParamValidatorCallbacks, Wikimedia\ParamValidator\SimpleCallbacks, and MediaWiki\Rest\Validator\ParamValidatorCallbacks.
Wikimedia\ParamValidator\Callbacks::getValue | ( | $name, | |
$default, | |||
array | $options ) |
Fetch a value from the request.
Return $default
for file-upload parameters.
string | $name | Parameter name to fetch |
mixed | $default | Default value to return if the parameter is unset. |
array | $options | Options array |
Implemented in MediaWiki\Api\Validator\ApiParamValidatorCallbacks, Wikimedia\ParamValidator\SimpleCallbacks, and MediaWiki\Rest\Validator\ParamValidatorCallbacks.
Wikimedia\ParamValidator\Callbacks::hasParam | ( | $name, | |
array | $options ) |
Test if a parameter exists in the request.
string | $name | Parameter name |
array | $options | Options array |
Implemented in MediaWiki\Api\Validator\ApiParamValidatorCallbacks, Wikimedia\ParamValidator\SimpleCallbacks, and MediaWiki\Rest\Validator\ParamValidatorCallbacks.
Wikimedia\ParamValidator\Callbacks::hasUpload | ( | $name, | |
array | $options ) |
Test if a parameter exists as an upload in the request.
string | $name | Parameter name |
array | $options | Options array |
Implemented in MediaWiki\Api\Validator\ApiParamValidatorCallbacks, Wikimedia\ParamValidator\SimpleCallbacks, and MediaWiki\Rest\Validator\ParamValidatorCallbacks.
Wikimedia\ParamValidator\Callbacks::recordCondition | ( | DataMessageValue | $message, |
$name, | |||
$value, | |||
array | $settings, | ||
array | $options ) |
Record non-fatal conditions.
DataMessageValue | $message | Failure message |
string | $name | Parameter name |
mixed | $value | Parameter value |
array | $settings | Parameter settings array |
array | $options | Options array |
Implemented in MediaWiki\Api\Validator\ApiParamValidatorCallbacks, Wikimedia\ParamValidator\SimpleCallbacks, and MediaWiki\Rest\Validator\ParamValidatorCallbacks.
Wikimedia\ParamValidator\Callbacks::useHighLimits | ( | array | $options | ) |
Indicate whether "high limits" should be used.
Some settings have multiple limits, one for "normal" users and a higher one for "privileged" users. This is used to determine which class the current user is in when necessary.
array | $options | Options array |
Implemented in MediaWiki\Api\Validator\ApiParamValidatorCallbacks, Wikimedia\ParamValidator\SimpleCallbacks, and MediaWiki\Rest\Validator\ParamValidatorCallbacks.