Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Lib\Store\SourceAndTypeDispatchingUrlLookup Class Reference
+ Inheritance diagram for Wikibase\Lib\Store\SourceAndTypeDispatchingUrlLookup:
+ Collaboration diagram for Wikibase\Lib\Store\SourceAndTypeDispatchingUrlLookup:

Public Member Functions

 __construct (ServiceBySourceAndTypeDispatcher $serviceDispatcher, EntitySourceLookup $sourceLookup)
 
 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.
 

Private Attributes

 $serviceDispatcher
 
 $sourceLookup
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lib\Store\SourceAndTypeDispatchingUrlLookup::__construct ( ServiceBySourceAndTypeDispatcher $serviceDispatcher,
EntitySourceLookup $sourceLookup )

Member Function Documentation

◆ getFullUrl()

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

Always returns the full URL.

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

Parameters
EntityId$id
Returns
string|null

Implements Wikibase\Lib\Store\EntityUrlLookup.

◆ getLinkUrl()

Wikibase\Lib\Store\SourceAndTypeDispatchingUrlLookup::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

Implements Wikibase\Lib\Store\EntityUrlLookup.

Member Data Documentation

◆ $serviceDispatcher

Wikibase\Lib\Store\SourceAndTypeDispatchingUrlLookup::$serviceDispatcher
private

◆ $sourceLookup

Wikibase\Lib\Store\SourceAndTypeDispatchingUrlLookup::$sourceLookup
private

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