Wikibase
MediaWiki Wikibase extension
Wikibase\Repo\ChangeOp\Deserialization\SiteLinksChangeOpDeserializer Class Reference

Deserializer for site link change requests. More...

+ Inheritance diagram for Wikibase\Repo\ChangeOp\Deserialization\SiteLinksChangeOpDeserializer:
+ Collaboration diagram for Wikibase\Repo\ChangeOp\Deserialization\SiteLinksChangeOpDeserializer:

Public Member Functions

 __construct (SiteLinkBadgeChangeOpSerializationValidator $badgeChangeOpSerializationValidator, SiteLinkChangeOpFactory $siteLinkChangeOpFactory, SiteLinkTargetProvider $siteLinkTargetProvider, EntityIdParser $entityIdParser, StringNormalizer $stringNormalizer, array $siteLinkGroups)
 
 createEntityChangeOp (array $changeRequest)
 

Private Member Functions

 validateSiteLinkSerialization ( $serialization, $siteCode, SiteList $sites=null)
 
 getBadgeItemIds (array $badgeSerialization)
 
 throwException ( $message, $errorCode)
 
 assertArray ( $value, $message)
 
 assertString ( $value, $message)
 
 assertType ( $type, $value, $message)
 

Private Attributes

 $badgeChangeOpSerializationValidator
 
 $siteLinkChangeOpFactory
 
 $siteLinkTargetProvider
 
 $siteLinkGroups
 
 $entityIdParser
 
 $stringNormalizer
 

Detailed Description

Deserializer for site link change requests.

See also
md_docs_topics_changeop-serializations for documentation on site link change request format.

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\ChangeOp\Deserialization\SiteLinksChangeOpDeserializer::__construct ( SiteLinkBadgeChangeOpSerializationValidator  $badgeChangeOpSerializationValidator,
SiteLinkChangeOpFactory  $siteLinkChangeOpFactory,
SiteLinkTargetProvider  $siteLinkTargetProvider,
EntityIdParser  $entityIdParser,
StringNormalizer  $stringNormalizer,
array  $siteLinkGroups 
)
Parameters
SiteLinkBadgeChangeOpSerializationValidator$badgeChangeOpSerializationValidator
SiteLinkChangeOpFactory$siteLinkChangeOpFactory
SiteLinkTargetProvider$siteLinkTargetProvider
EntityIdParser$entityIdParser
StringNormalizer$stringNormalizer
string[]$siteLinkGroups

Member Function Documentation

◆ assertArray()

Wikibase\Repo\ChangeOp\Deserialization\SiteLinksChangeOpDeserializer::assertArray (   $value,
  $message 
)
private
Parameters
mixed$value
string$message-assert array $value

◆ assertString()

Wikibase\Repo\ChangeOp\Deserialization\SiteLinksChangeOpDeserializer::assertString (   $value,
  $message 
)
private
Parameters
mixed$value
string$message-assert string $value

◆ assertType()

Wikibase\Repo\ChangeOp\Deserialization\SiteLinksChangeOpDeserializer::assertType (   $type,
  $value,
  $message 
)
private
Parameters
string$type
mixed$value
string$message

◆ createEntityChangeOp()

Wikibase\Repo\ChangeOp\Deserialization\SiteLinksChangeOpDeserializer::createEntityChangeOp ( array  $changeRequest)

◆ getBadgeItemIds()

Wikibase\Repo\ChangeOp\Deserialization\SiteLinksChangeOpDeserializer::getBadgeItemIds ( array  $badgeSerialization)
private
Parameters
string[]$badgeSerialization
Returns
ItemId[]

◆ throwException()

Wikibase\Repo\ChangeOp\Deserialization\SiteLinksChangeOpDeserializer::throwException (   $message,
  $errorCode 
)
private
Parameters
string$message
string$errorCode
Exceptions
ChangeOpDeserializationException

◆ validateSiteLinkSerialization()

Wikibase\Repo\ChangeOp\Deserialization\SiteLinksChangeOpDeserializer::validateSiteLinkSerialization (   $serialization,
  $siteCode,
SiteList  $sites = null 
)
private
Parameters
array$serializationSite link serialization array
string$siteCode
SiteList | null$sitesValid sites. Null for skipping site validity check.
Exceptions
ChangeOpDeserializationException

Member Data Documentation

◆ $badgeChangeOpSerializationValidator

Wikibase\Repo\ChangeOp\Deserialization\SiteLinksChangeOpDeserializer::$badgeChangeOpSerializationValidator
private

◆ $entityIdParser

Wikibase\Repo\ChangeOp\Deserialization\SiteLinksChangeOpDeserializer::$entityIdParser
private

◆ $siteLinkChangeOpFactory

Wikibase\Repo\ChangeOp\Deserialization\SiteLinksChangeOpDeserializer::$siteLinkChangeOpFactory
private

◆ $siteLinkGroups

Wikibase\Repo\ChangeOp\Deserialization\SiteLinksChangeOpDeserializer::$siteLinkGroups
private

◆ $siteLinkTargetProvider

Wikibase\Repo\ChangeOp\Deserialization\SiteLinksChangeOpDeserializer::$siteLinkTargetProvider
private

◆ $stringNormalizer

Wikibase\Repo\ChangeOp\Deserialization\SiteLinksChangeOpDeserializer::$stringNormalizer
private

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