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

Public Member Functions

 __construct (TermValidatorFactoryLabelTextValidator $labelTextValidator, TermsCollisionDetector $termsCollisionDetector, ItemRetriever $itemRetriever)
 
 validate (ItemId $itemId, string $language, string $label)
 

Private Member Functions

 validateItem (ItemId $itemId, string $language, string $label)
 

Private Attributes

TermValidatorFactoryLabelTextValidator $labelTextValidator
 
TermsCollisionDetector $termsCollisionDetector
 
ItemRetriever $itemRetriever
 

Additional Inherited Members

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

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\RestApi\Infrastructure\WikibaseRepoItemLabelValidator::__construct ( TermValidatorFactoryLabelTextValidator $labelTextValidator,
TermsCollisionDetector $termsCollisionDetector,
ItemRetriever $itemRetriever )

Member Function Documentation

◆ validate()

Wikibase\Repo\RestApi\Infrastructure\WikibaseRepoItemLabelValidator::validate ( ItemId $itemId,
string $language,
string $label )

◆ validateItem()

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

Member Data Documentation

◆ $itemRetriever

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

◆ $labelTextValidator

TermValidatorFactoryLabelTextValidator Wikibase\Repo\RestApi\Infrastructure\WikibaseRepoItemLabelValidator::$labelTextValidator
private

◆ $termsCollisionDetector

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

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