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

Validator for commons media values which checks whether the file in question exists. More...

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

Public Member Functions

 __construct (CachingCommonsMediaFileNameLookup $fileNameLookup)
 
 validate ( $value)
 
 setOptions (array $options)
 

Private Attributes

 $fileNameLookup
 

Detailed Description

Validator for commons media values which checks whether the file in question exists.

Doesn't check whether the name is normalized.

Author
Marius Hoch

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Validators\CommonsMediaExistsValidator::__construct ( CachingCommonsMediaFileNameLookup $fileNameLookup)

Member Function Documentation

◆ setOptions()

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

◆ validate()

Wikibase\Repo\Validators\CommonsMediaExistsValidator::validate ( $value)
See also
ValueValidator::validate()
Parameters
StringValue | string$value
Returns
Result
Exceptions
InvalidArgumentException

Member Data Documentation

◆ $fileNameLookup

Wikibase\Repo\Validators\CommonsMediaExistsValidator::$fileNameLookup
private

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