Wikibase
MediaWiki Wikibase extension
Wikibase\DataModel\Services\Lookup\EntityRedirectTargetLookup Interface Reference

Service interface for looking up an Entity's redirect target id. More...

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

Public Member Functions

 getRedirectForEntityId (EntityId $entityId, $forUpdate='')
 Returns the redirect target associated with the given redirect ID. More...
 

Public Attributes

const FOR_UPDATE = 'for update'
 

Detailed Description

Service interface for looking up an Entity's redirect target id.

Since
5.4

Member Function Documentation

◆ getRedirectForEntityId()

Wikibase\DataModel\Services\Lookup\EntityRedirectTargetLookup::getRedirectForEntityId ( EntityId  $entityId,
  $forUpdate = '' 
)

Returns the redirect target associated with the given redirect ID.

Since
2.0
Parameters
EntityId$entityId
string$forUpdateIf EntityRedirectTargetLookup::FOR_UPDATE is given the redirect will be determined from the canonical master database.
Returns
EntityId|null The ID of the redirect target, or null if $entityId does not refer to a redirect.
Exceptions
EntityRedirectLookupException

Implemented in Wikibase\Repo\Store\Sql\WikiPageEntityRedirectLookup, and Wikibase\Lib\Store\RevisionBasedEntityRedirectTargetLookup.

Member Data Documentation

◆ FOR_UPDATE

const Wikibase\DataModel\Services\Lookup\EntityRedirectTargetLookup::FOR_UPDATE = 'for update'
Since
5.4

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