MediaWiki
1.34.4
|
Type definition for "limit" types. More...
Public Member Functions | |||||||||||||||
normalizeSettings (array $settings) | |||||||||||||||
Normalize a settings array. More... | |||||||||||||||
validate ( $name, $value, array $settings, array $options) | |||||||||||||||
Validate the value.When ParamValidator is processing a multi-valued parameter, this will be called once for each of the supplied values. Which may mean zero calls.When getValue() returned null, this will not be called.
| |||||||||||||||
Public Member Functions inherited from Wikimedia\ParamValidator\TypeDef\IntegerDef | |||||||||||||||
describeSettings ( $name, array $settings, array $options) | |||||||||||||||
"Describe" a settings array More... | |||||||||||||||
Public Member Functions inherited from Wikimedia\ParamValidator\TypeDef | |||||||||||||||
__construct (Callbacks $callbacks) | |||||||||||||||
getEnumValues ( $name, array $settings, array $options) | |||||||||||||||
Get the values for enum-like parameters. More... | |||||||||||||||
getValue ( $name, array $settings, array $options) | |||||||||||||||
Get the value from the request. More... | |||||||||||||||
stringifyValue ( $name, $value, array $settings, array $options) | |||||||||||||||
Convert a value to a string representation. More... | |||||||||||||||
Additional Inherited Members | |
Public Attributes inherited from Wikimedia\ParamValidator\TypeDef\IntegerDef | |
const | PARAM_IGNORE_RANGE = 'param-ignore-range' |
(bool) Whether to enforce the specified range. More... | |
const | PARAM_MAX = 'param-max' |
(int) Maximum allowed value (normal limits) More... | |
const | PARAM_MAX2 = 'param-max2' |
(int) Maximum allowed value (high limits) More... | |
const | PARAM_MIN = 'param-min' |
(int) Minimum allowed value. More... | |
Protected Attributes inherited from Wikimedia\ParamValidator\TypeDef | |
Callbacks | $callbacks |
Type definition for "limit" types.
A limit type is an integer type that also accepts the magic value "max". IntegerDef::PARAM_MIN defaults to 0 for this type.
Definition at line 15 of file LimitDef.php.
Wikimedia\ParamValidator\TypeDef\LimitDef::normalizeSettings | ( | array | $settings | ) |
Normalize a settings array.
array | $settings |
Reimplemented from Wikimedia\ParamValidator\TypeDef\IntegerDef.
Definition at line 37 of file LimitDef.php.
Wikimedia\ParamValidator\TypeDef\LimitDef::validate | ( | $name, | |
$value, | |||
array | $settings, | ||
array | $options | ||
) |
Validate the value.When ParamValidator is processing a multi-valued parameter, this will be called once for each of the supplied values. Which may mean zero calls.When getValue() returned null, this will not be called.
string | $name | Parameter name being validated. |
mixed | $value | Value to validate, from getValue(). |
array | $settings | Parameter settings array. |
array | $options | Options array. Note the following values that may be set by ParamValidator:
|
ValidationException | if the value is invalid |
Additional $options
accepted:
Reimplemented from Wikimedia\ParamValidator\TypeDef\IntegerDef.
Definition at line 24 of file LimitDef.php.
References Wikimedia\ParamValidator\TypeDef\IntegerDef\PARAM_MAX, and Wikimedia\ParamValidator\TypeDef\IntegerDef\PARAM_MAX2.