MediaWiki
1.34.0
|
Class responsible for validating Gadget definition contents. More...
Public Member Functions | |
validate (array $properties, $tolerateMissing=false) | |
Check the validity of the given properties array. More... | |
Static Public Member Functions | |
static | isArrayOrTrue ( $value) |
Static Protected Attributes | |
static | $propertyValidation |
Validation metadata. More... | |
Class responsible for validating Gadget definition contents.
Definition at line 8 of file GadgetDefinitionValidator.php.
|
static |
GadgetDefinitionValidator::validate | ( | array | $properties, |
$tolerateMissing = false |
|||
) |
Check the validity of the given properties array.
array | $properties | Return value of FormatJson::decode( $blob, true ) |
bool | $tolerateMissing | If true, don't complain about missing keys |
Definition at line 44 of file GadgetDefinitionValidator.php.
References $path, StatusValue\newFatal(), and StatusValue\newGood().
|
staticprotected |
Validation metadata.
'foo.bar.baz' => [ 'type check callback', 'type name' [, 'member type check callback', 'member type name'] ]
Definition at line 14 of file GadgetDefinitionValidator.php.