Wikibase
MediaWiki Wikibase extension
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. More...
 

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\SiteLinkUniquenessValidator, Wikibase\Repo\Validators\LabelDescriptionNotEqualValidator, and Wikibase\Repo\Validators\CompositeEntityValidator.


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