Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Client\DataAccess\PropertyIdResolver Class Reference

Resolves the NumericPropertyId for the input, which might be a property label or prefixed id. More...

Public Member Functions

 __construct (EntityLookup $entityLookup, PropertyLabelResolver $propertyLabelResolver, UsageAccumulator $usageAccumulator)
 
 resolvePropertyId ( $propertyLabelOrId, $languageCode)
 

Private Member Functions

 findPropertyByLabel ( $propertyLabel, $languageCode)
 XXX: It might become useful to give the PropertyLabelResolver a hint as to which properties may become relevant during the present request, namely the ones used by the Item linked to the current page.
 

Private Attributes

 $entityLookup
 
 $propertyLabelResolver
 
 $usageAccumulator
 

Detailed Description

Resolves the NumericPropertyId for the input, which might be a property label or prefixed id.

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Client\DataAccess\PropertyIdResolver::__construct ( EntityLookup $entityLookup,
PropertyLabelResolver $propertyLabelResolver,
UsageAccumulator $usageAccumulator )

Member Function Documentation

◆ findPropertyByLabel()

Wikibase\Client\DataAccess\PropertyIdResolver::findPropertyByLabel ( $propertyLabel,
$languageCode )
private

XXX: It might become useful to give the PropertyLabelResolver a hint as to which properties may become relevant during the present request, namely the ones used by the Item linked to the current page.

This could be done with something like this: $this->propertyLabelResolver->preloadLabelsFor( $propertiesUsedByItem );

Parameters
string$propertyLabel
string$languageCode
Returns
NumericPropertyId
Exceptions
PropertyLabelNotResolvedException

◆ resolvePropertyId()

Wikibase\Client\DataAccess\PropertyIdResolver::resolvePropertyId ( $propertyLabelOrId,
$languageCode )
Parameters
string$propertyLabelOrId
string$languageCode
Exceptions
PropertyLabelNotResolvedException
Returns
NumericPropertyId

Member Data Documentation

◆ $entityLookup

Wikibase\Client\DataAccess\PropertyIdResolver::$entityLookup
private

◆ $propertyLabelResolver

Wikibase\Client\DataAccess\PropertyIdResolver::$propertyLabelResolver
private

◆ $usageAccumulator

Wikibase\Client\DataAccess\PropertyIdResolver::$usageAccumulator
private

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