Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\Validators\EntityValidator Interface Reference

Validator interface used for validating Entities in a global context. More...

+ Inheritance diagram for Wikibase\Repo\Validators\EntityValidator:

Public Member Functions

 validateEntity (EntityDocument $entity)
 Validate an entity before saving.
 

Detailed Description

Validator interface used for validating Entities in a global context.

This is used to represent global constraints.

See also
EntityConstraintProivder
Author
Daniel Kinzler

Member Function Documentation

◆ validateEntity()

Wikibase\Repo\Validators\EntityValidator::validateEntity ( EntityDocument  $entity)

Validate an entity before saving.

This is intended for enforcing "hard" global constraints.

Parameters
EntityDocument$entityThe entity to validate
Returns
Result The validation result. Errors in the Result object will typically be instances of UniquenessViolation.

Implemented in Wikibase\Repo\Validators\CompositeEntityValidator, Wikibase\Repo\Validators\LabelDescriptionNotEqualValidator, Wikibase\Repo\Validators\LabelDescriptionUniquenessValidator, Wikibase\Repo\Validators\LabelUniquenessValidator, and Wikibase\Repo\Validators\SiteLinkUniquenessValidator.


The documentation for this interface was generated from the following file: