Wikibase
MediaWiki Wikibase extension
Wikibase\Lib\Store\EntityLinkTargetEntityIdLookup Class Reference
+ Inheritance diagram for Wikibase\Lib\Store\EntityLinkTargetEntityIdLookup:
+ Collaboration diagram for Wikibase\Lib\Store\EntityLinkTargetEntityIdLookup:

Public Member Functions

 __construct (EntityNamespaceLookup $namespaceLookup, EntityIdParser $entityIdParser, EntitySourceDefinitions $entitySourceDefinitions, DatabaseEntitySource $localSource)
 
 getEntityId (LinkTarget $linkTarget)
 Returns the EntityId for a given LinkTarget. More...
 

Private Member Functions

 getEntityIdFromExternalLink (LinkTarget $linkTarget)
 
 getEntityIdFromLocalLink (LinkTarget $linkTarget)
 
 parseEntityId (string $id)
 

Private Attributes

const SPECIAL_ENTITY_PAGE = 'Special:EntityPage'
 used e.g. More...
 
 $namespaceLookup
 
 $entityIdParser
 
 $entitySourceDefinitions
 
 $localSource
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lib\Store\EntityLinkTargetEntityIdLookup::__construct ( EntityNamespaceLookup  $namespaceLookup,
EntityIdParser  $entityIdParser,
EntitySourceDefinitions  $entitySourceDefinitions,
DatabaseEntitySource  $localSource 
)

Member Function Documentation

◆ getEntityId()

Wikibase\Lib\Store\EntityLinkTargetEntityIdLookup::getEntityId ( LinkTarget  $linkTarget)

Returns the EntityId for a given LinkTarget.

Parameters
LinkTarget$linkTargeteither directly to the Entity page, or to Special:EntityPage/<ID>
Returns
EntityId|null

Implements Wikibase\Lib\Store\LinkTargetEntityIdLookup.

◆ getEntityIdFromExternalLink()

Wikibase\Lib\Store\EntityLinkTargetEntityIdLookup::getEntityIdFromExternalLink ( LinkTarget  $linkTarget)
private

◆ getEntityIdFromLocalLink()

Wikibase\Lib\Store\EntityLinkTargetEntityIdLookup::getEntityIdFromLocalLink ( LinkTarget  $linkTarget)
private

◆ parseEntityId()

Wikibase\Lib\Store\EntityLinkTargetEntityIdLookup::parseEntityId ( string  $id)
private

Member Data Documentation

◆ $entityIdParser

Wikibase\Lib\Store\EntityLinkTargetEntityIdLookup::$entityIdParser
private

◆ $entitySourceDefinitions

Wikibase\Lib\Store\EntityLinkTargetEntityIdLookup::$entitySourceDefinitions
private

◆ $localSource

Wikibase\Lib\Store\EntityLinkTargetEntityIdLookup::$localSource
private

◆ $namespaceLookup

Wikibase\Lib\Store\EntityLinkTargetEntityIdLookup::$namespaceLookup
private

◆ SPECIAL_ENTITY_PAGE

const Wikibase\Lib\Store\EntityLinkTargetEntityIdLookup::SPECIAL_ENTITY_PAGE = 'Special:EntityPage'
private

used e.g.

for links from Commons to Wikidata in the form of d:Special:EntityPage/Q42


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