Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\Validators\EntityExistsValidator Class Reference

EntityExistsValidator checks that a given entity exists. More...

+ Inheritance diagram for Wikibase\Repo\Validators\EntityExistsValidator:
+ Collaboration diagram for Wikibase\Repo\Validators\EntityExistsValidator:

Public Member Functions

 __construct (EntityLookup $entityLookup, $entityType=null)
 
 validate ( $value)
 
 setOptions (array $options)
 

Private Attributes

 $entityLookup
 
 $entityType
 

Detailed Description

EntityExistsValidator checks that a given entity exists.

Author
Daniel Kinzler

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Validators\EntityExistsValidator::__construct ( EntityLookup $entityLookup,
$entityType = null )

Member Function Documentation

◆ setOptions()

Wikibase\Repo\Validators\EntityExistsValidator::setOptions ( array $options)
See also
ValueValidator::setOptions()
Parameters
array$options

◆ validate()

Wikibase\Repo\Validators\EntityExistsValidator::validate ( $value)
See also
ValueValidator::validate()
Parameters
EntityIdValue | EntityId$valueThe ID to validate
Returns
Result
Exceptions
InvalidArgumentException

Member Data Documentation

◆ $entityLookup

Wikibase\Repo\Validators\EntityExistsValidator::$entityLookup
private

◆ $entityType

Wikibase\Repo\Validators\EntityExistsValidator::$entityType
private

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