Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\DataModel\Services\Lookup\ReferencedEntityIdLookup Interface Reference

Service interface for getting a referenced entity (out of a specified set), from a given starting entity. More...

+ Inheritance diagram for Wikibase\DataModel\Services\Lookup\ReferencedEntityIdLookup:

Public Member Functions

 getReferencedEntityId (EntityId $fromId, PropertyId $propertyId, array $toIds)
 Get the referenced entity (out of $toIds), from a given entity.
 

Detailed Description

Service interface for getting a referenced entity (out of a specified set), from a given starting entity.

The starting entity, and the target entities are (potentially indirectly, via intermediate entities) linked by statements with a given property ID, pointing from the starting entity to one of the target entities.

Since
3.10
Author
Marius Hoch

Member Function Documentation

◆ getReferencedEntityId()

Wikibase\DataModel\Services\Lookup\ReferencedEntityIdLookup::getReferencedEntityId ( EntityId $fromId,
PropertyId $propertyId,
array $toIds )

Get the referenced entity (out of $toIds), from a given entity.

The starting entity, and the target entities are (potentially indirectly, via intermediate entities) linked by statements with the given property ID, pointing from the starting entity to one of the target entities. Implementations of this may or may not return the closest referenced entity (where distance is defined by the number of intermediate entities).

Since
3.10
Parameters
EntityId$fromId
PropertyId$propertyId
EntityId[]$toIds
Returns
EntityId|null Returns null in case none of the target entities are referenced.
Exceptions
ReferencedEntityIdLookupException

Implemented in Wikibase\DataModel\Services\Lookup\EntityRetrievingClosestReferencedEntityIdLookup.


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