Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Lib\Store\EntityUrlLookup Interface Reference
+ Inheritance diagram for Wikibase\Lib\Store\EntityUrlLookup:

Public Member Functions

 getFullUrl (EntityId $id)
 Always returns the full URL.
 
 getLinkUrl (EntityId $id)
 Get a URL that's the simplest URL that will be valid to link, locally, to the current Entity.
 

Detailed Description

Member Function Documentation

◆ getFullUrl()

Wikibase\Lib\Store\EntityUrlLookup::getFullUrl ( EntityId $id)

Always returns the full URL.

Example: https://www.wikidata.org/wiki/Property:P123

Parameters
EntityId$id
Returns
string|null

Implemented in Wikibase\Lib\Store\SourceAndTypeDispatchingUrlLookup, and Wikibase\Lib\Store\TitleLookupBasedEntityUrlLookup.

◆ getLinkUrl()

Wikibase\Lib\Store\EntityUrlLookup::getLinkUrl ( EntityId $id)

Get a URL that's the simplest URL that will be valid to link, locally, to the current Entity.

Example Contexts:

  • Regular Wikibase Entities will normally want to return relative URLs.
  • Entities on remote Wikibases probably always want to return full URLs.

Example Values: /wiki/Property:P123 or similar to getFullUrl()

Parameters
EntityId$id
Returns
string|null

Implemented in Wikibase\Lib\Store\SourceAndTypeDispatchingUrlLookup, Wikibase\Lib\Store\TitleLookupBasedEntityUrlLookup, and Wikibase\Repo\FederatedProperties\ApiEntityUrlLookup.


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