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

Public Member Functions

 __construct (SitelinkDeserializer $sitelinkDeserializer, SiteLinkLookup $siteLinkLookup)
 
 validate (?string $itemId, string $siteId, array $sitelink, string $basePath='')
 
 getValidatedSitelink ()
 

Private Member Functions

 checkSitelinkConflict (?string $itemId, SiteLink $siteLink)
 

Private Attributes

SitelinkDeserializer $sitelinkDeserializer
 
SiteLinkLookup $siteLinkLookup
 
SiteLink $deserializedSitelink = null
 

Additional Inherited Members

- Public Attributes inherited from Wikibase\Repo\RestApi\Application\Validation\SitelinkValidator
const CODE_TITLE_MISSING = 'sitelink-validator-code-title-missing'
 
const CODE_EMPTY_TITLE = 'sitelink-validator-code-empty-title'
 
const CODE_INVALID_TITLE = 'sitelink-validator-code-invalid-title'
 
const CODE_INVALID_FIELD_TYPE = 'sitelink-validator-code-invalid-field-type'
 
const CODE_INVALID_BADGE = 'sitelink-validator-code-invalid-badge'
 
const CODE_BADGE_NOT_ALLOWED = 'sitelink-validator-code-badge-not-allowed'
 
const CODE_TITLE_NOT_FOUND = 'sitelink-validator-code-title-not-found'
 
const CODE_SITELINK_CONFLICT = 'sitelink-validator-code-sitelink-conflict'
 
const CONTEXT_CONFLICTING_ITEM_ID = 'sitelink-validator-context-conflicting-item-id'
 
const CONTEXT_SITE_ID = 'sitelink-validator-context-site-id'
 
const CONTEXT_PATH = 'sitelink-validator-context-path'
 
const CONTEXT_VALUE = 'sitelink-validator-context-value'
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\RestApi\Infrastructure\SiteLinkLookupSitelinkValidator::__construct ( SitelinkDeserializer $sitelinkDeserializer,
SiteLinkLookup $siteLinkLookup )

Member Function Documentation

◆ checkSitelinkConflict()

Wikibase\Repo\RestApi\Infrastructure\SiteLinkLookupSitelinkValidator::checkSitelinkConflict ( ?string $itemId,
SiteLink $siteLink )
private

◆ getValidatedSitelink()

Wikibase\Repo\RestApi\Infrastructure\SiteLinkLookupSitelinkValidator::getValidatedSitelink ( )

◆ validate()

Wikibase\Repo\RestApi\Infrastructure\SiteLinkLookupSitelinkValidator::validate ( ?string $itemId,
string $siteId,
array $sitelink,
string $basePath = '' )
Parameters
string | null$itemId- null if validating a new item

Implements Wikibase\Repo\RestApi\Application\Validation\SitelinkValidator.

Member Data Documentation

◆ $deserializedSitelink

SiteLink Wikibase\Repo\RestApi\Infrastructure\SiteLinkLookupSitelinkValidator::$deserializedSitelink = null
private

◆ $sitelinkDeserializer

SitelinkDeserializer Wikibase\Repo\RestApi\Infrastructure\SiteLinkLookupSitelinkValidator::$sitelinkDeserializer
private

◆ $siteLinkLookup

SiteLinkLookup Wikibase\Repo\RestApi\Infrastructure\SiteLinkLookupSitelinkValidator::$siteLinkLookup
private

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