Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\RestApi\Infrastructure\WikibaseRepoItemDescriptionValidator Class Reference
+ Inheritance diagram for Wikibase\Repo\RestApi\Infrastructure\WikibaseRepoItemDescriptionValidator:
+ Collaboration diagram for Wikibase\Repo\RestApi\Infrastructure\WikibaseRepoItemDescriptionValidator:

Public Member Functions

 __construct (TermValidatorFactory $termValidatorFactory, TermsCollisionDetector $termsCollisionDetector, ItemRetriever $itemRetriever)
 
 validate (ItemId $itemId, string $language, string $description)
 

Private Member Functions

 validateDescription (string $description)
 
 validateItem (ItemId $itemId, string $language, string $description)
 

Private Attributes

TermValidatorFactory $termValidatorFactory
 
TermsCollisionDetector $termsCollisionDetector
 
ItemRetriever $itemRetriever
 

Additional Inherited Members

- Public Attributes inherited from Wikibase\Repo\RestApi\Application\Validation\ItemDescriptionValidator
const CODE_INVALID = 'invalid-description'
 
const CODE_EMPTY = 'description-empty'
 
const CODE_TOO_LONG = 'description-too-long'
 
const CODE_LABEL_DESCRIPTION_EQUAL = 'label-description-equal'
 
const CODE_LABEL_DESCRIPTION_DUPLICATE = 'label-description-duplicate'
 
const CONTEXT_LIMIT = 'character-limit'
 
const CONTEXT_LANGUAGE = 'language'
 
const CONTEXT_LABEL = 'label'
 
const CONTEXT_DESCRIPTION = 'description'
 
const CONTEXT_MATCHING_ITEM_ID = 'matching-item-id'
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\RestApi\Infrastructure\WikibaseRepoItemDescriptionValidator::__construct ( TermValidatorFactory $termValidatorFactory,
TermsCollisionDetector $termsCollisionDetector,
ItemRetriever $itemRetriever )

Member Function Documentation

◆ validate()

Wikibase\Repo\RestApi\Infrastructure\WikibaseRepoItemDescriptionValidator::validate ( ItemId $itemId,
string $language,
string $description )

◆ validateDescription()

Wikibase\Repo\RestApi\Infrastructure\WikibaseRepoItemDescriptionValidator::validateDescription ( string $description)
private

◆ validateItem()

Wikibase\Repo\RestApi\Infrastructure\WikibaseRepoItemDescriptionValidator::validateItem ( ItemId $itemId,
string $language,
string $description )
private

Member Data Documentation

◆ $itemRetriever

ItemRetriever Wikibase\Repo\RestApi\Infrastructure\WikibaseRepoItemDescriptionValidator::$itemRetriever
private

◆ $termsCollisionDetector

TermsCollisionDetector Wikibase\Repo\RestApi\Infrastructure\WikibaseRepoItemDescriptionValidator::$termsCollisionDetector
private

◆ $termValidatorFactory

TermValidatorFactory Wikibase\Repo\RestApi\Infrastructure\WikibaseRepoItemDescriptionValidator::$termValidatorFactory
private

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