Current File : /home/jvzmxxx/wiki1/extensions/Wikibase/repo/includes/Validators/EntityValidator.php
<?php

namespace Wikibase\Repo\Validators;

use ValueValidators\Result;
use Wikibase\DataModel\Entity\EntityDocument;

/**
 * Validator interface used for validating Entities in a global context.
 * This is used to represent global constraints.
 *
 * @see EntityConstraintProivder
 *
 * @since 0.5
 *
 * @license GPL-2.0+
 * @author Daniel Kinzler
 */
interface EntityValidator {

	/**
	 * Validate an entity before saving.
	 * This is intended for enforcing "hard" global constraints.
	 *
	 * @since 0.5
	 *
	 * @param EntityDocument $entity The entity to validate
	 *
	 * @return Result The validation result. Errors in the Result object
	 *         will typically be instances of UniquenessViolation.
	 */
	public function validateEntity( EntityDocument $entity );

}