Wikibase
MediaWiki Wikibase extension
|
Validator for checking that a given string is NOT an EntityId. More...
Public Member Functions | |
__construct (EntityIdParser $idParser, $errorCode, array $forbiddenTypes=null) | |
validate ( $value) | |
setOptions (array $options) | |
Private Attributes | |
$idParser | |
$errorCode | |
$forbiddenTypes | |
Validator for checking that a given string is NOT an EntityId.
Useful e.g. for preventing property labels that "look like" property IDs.
Wikibase\Repo\Validators\NotEntityIdValidator::__construct | ( | EntityIdParser | $idParser, |
$errorCode, | |||
array | $forbiddenTypes = null ) |
EntityIdParser | $idParser | The parser to use for testing whether a string is an entity ID. |
string | $errorCode | The error code to use when this validator fails. |
string[] | null | $forbiddenTypes | A list of entity types who's IDs should be considered invalid values. If null, all valid entity IDs are considered invalid input. |
InvalidArgumentException |
Wikibase\Repo\Validators\NotEntityIdValidator::setOptions | ( | array | $options | ) |
array | $options |
Wikibase\Repo\Validators\NotEntityIdValidator::validate | ( | $value | ) |
string | $value | The value to validate |
|
private |
|
private |
|
private |