Provides validators for terms (like the maximum length of labels, etc).
More...
Provides validators for terms (like the maximum length of labels, etc).
- Copyright
- GPL-2.0-or-later
- Author
- Daniel Kinzler
◆ __construct()
Wikibase\Repo\Validators\TermValidatorFactory::__construct |
( |
|
$maxLength, |
|
|
array |
$languageCodes, |
|
|
EntityIdParser |
$idParser, |
|
|
LabelDescriptionDuplicateDetector |
$duplicateDetector, |
|
|
TermsCollisionDetectorFactory |
$termsCollisionDetectorFactory, |
|
|
TermLookup |
$termLookup, |
|
|
array |
$itemTermsMigrationStages, |
|
|
int |
$propertyTermsMigrationStage |
|
) |
| |
- Parameters
-
int | $maxLength | The maximum length of terms. |
string[] | $languageCodes | A list of valid language codes |
EntityIdParser | $idParser | |
LabelDescriptionDuplicateDetector | $duplicateDetector | |
TermsCollisionDetectorFactory | $termsCollisionDetectorFactory | |
TermLookup | $termLookup | |
array | $itemTermsMigrationStages | |
int | $propertyTermsMigrationStage | |
- Exceptions
-
◆ getAliasValidator()
Wikibase\Repo\Validators\TermValidatorFactory::getAliasValidator |
( |
|
$entityType | ) |
|
- Parameters
-
- Returns
- ValueValidator
◆ getCommonTermValidators()
Wikibase\Repo\Validators\TermValidatorFactory::getCommonTermValidators |
( |
|
$errorCodePrefix | ) |
|
|
private |
- Parameters
-
- Returns
- ValueValidator[]
◆ getDescriptionValidator()
Wikibase\Repo\Validators\TermValidatorFactory::getDescriptionValidator |
( |
| ) |
|
◆ getFingerprintUniquenessValidator()
Wikibase\Repo\Validators\TermValidatorFactory::getFingerprintUniquenessValidator |
( |
string |
$entityType | ) |
|
Not to be confused with getFingerprintValidator().
This function returns fingerprint uniqueness validator that validates uniqueness only in new store. While getFingerprintValidator() returns Fingerprint validators to be applied on entire entity, including uniqueness checks in old store.
◆ getFingerprintValidator()
Wikibase\Repo\Validators\TermValidatorFactory::getFingerprintValidator |
( |
|
$entityType, |
|
|
EntityId |
$entityId |
|
) |
| |
Returns a validator for checking an (updated) fingerprint.
May be used to apply global uniqueness checks.
- Note
- The fingerprint validator provided here is intended to apply checks in ADDITION to the ones performed by the validators returned by the getLabelValidator() etc functions below.
- Parameters
-
- Returns
- FingerprintValidator
◆ getLabelValidator()
Wikibase\Repo\Validators\TermValidatorFactory::getLabelValidator |
( |
|
$entityType | ) |
|
- Parameters
-
- Returns
- ValueValidator
◆ getLanguageValidator()
Wikibase\Repo\Validators\TermValidatorFactory::getLanguageValidator |
( |
| ) |
|
◆ $duplicateDetector
Wikibase\Repo\Validators\TermValidatorFactory::$duplicateDetector |
|
private |
◆ $idParser
Wikibase\Repo\Validators\TermValidatorFactory::$idParser |
|
private |
◆ $itemTermsMigrationStages
Wikibase\Repo\Validators\TermValidatorFactory::$itemTermsMigrationStages |
|
private |
◆ $languageCodes
Wikibase\Repo\Validators\TermValidatorFactory::$languageCodes |
|
private |
◆ $maxLength
Wikibase\Repo\Validators\TermValidatorFactory::$maxLength |
|
private |
◆ $propertyTermsMigrationStage
Wikibase\Repo\Validators\TermValidatorFactory::$propertyTermsMigrationStage |
|
private |
◆ $termLookup
Wikibase\Repo\Validators\TermValidatorFactory::$termLookup |
|
private |
◆ $termsCollisionDetectorFactory
Wikibase\Repo\Validators\TermValidatorFactory::$termsCollisionDetectorFactory |
|
private |
The documentation for this class was generated from the following file: