- Copyright
- GPL-2.0-or-later
- Author
- Daniel Kinzler
◆ __construct()
◆ setOptions()
Wikibase\Repo\Validators\SnakValidator::setOptions |
( |
array |
$options | ) |
|
- See also
- ValueValidator::setOptions()
- Parameters
-
◆ validate()
Wikibase\Repo\Validators\SnakValidator::validate |
( |
|
$snak | ) |
|
Validates a Snak.
For a PropertyValueSnak, this is done using the validators from the DataType that is associated with the Snak's property. Other Snak types are currently not validated.
- See also
- ValueValidator::validate()
- Parameters
-
Snak | $snak | The value to validate |
- Exceptions
-
- Returns
- Result
◆ validateClaimSnaks()
Wikibase\Repo\Validators\SnakValidator::validateClaimSnaks |
( |
Statement |
$statement | ) |
|
Applies validation to the given Claim.
This is done by validating all snaks contained in the claim, notably: the main snak, the qualifiers, and all snaks of all references, in case the claim is a Statement.
- Parameters
-
Statement | $statement | The value to validate |
- Returns
- Result
◆ validateDataValue()
Wikibase\Repo\Validators\SnakValidator::validateDataValue |
( |
DataValue |
$dataValue, |
|
|
|
$dataTypeId |
|
) |
| |
Validates the given data value using the given data type.
- Parameters
-
DataValue | $dataValue | |
string | $dataTypeId | |
- Returns
- Result
◆ validateReference()
Wikibase\Repo\Validators\SnakValidator::validateReference |
( |
Reference |
$reference | ) |
|
Validate a list of references.
This is done by validating all snaks in all of the references.
- Parameters
-
- Returns
- Result
◆ validateReferences()
Wikibase\Repo\Validators\SnakValidator::validateReferences |
( |
ReferenceList |
$references | ) |
|
Validate a list of references.
This is done by validating all snaks in all of the references.
- Parameters
-
- Returns
- Result
◆ $dataTypeFactory
Wikibase\Repo\Validators\SnakValidator::$dataTypeFactory |
|
private |
◆ $propertyDataTypeLookup
Wikibase\Repo\Validators\SnakValidator::$propertyDataTypeLookup |
|
private |
◆ $validatorFactory
Wikibase\Repo\Validators\SnakValidator::$validatorFactory |
|
private |
The documentation for this class was generated from the following file: