Wikibase
MediaWiki Wikibase extension
Wikibase\Client\WikibaseClient Class Reference

Top level factory for the WikibaseClient extension. More...

Public Member Functions

 __construct (SiteLookup $siteLookup)
 
 getPropertyDataTypeLookup ()
 
 getStringNormalizer (ContainerInterface $services=null)
 
 getContentLanguage ()
 
 getLangLinkHandlerFactory ()
 
 getParserOutputDataUpdater ()
 
 getSidebarLinkBadgeDisplay ()
 
 getLanguageLinkBadgeDisplay ()
 
 getLuaEntityModules ()
 
 getOtherProjectsSidebarGeneratorFactory ()
 
 getDataAccessSnakFormatterFactory ()
 
 getPropertyParserFunctionRunner ()
 
 getTermsLanguages ()
 Get a ContentLanguages object holding the languages available for labels, descriptions and aliases. More...
 
 getRestrictedEntityLookup ()
 
 getReferenceFormatterFactory ()
 

Static Public Member Functions

static getDefaultValueFormatterBuilders ()
 
static getDefaultSnakFormatterBuilders ()
 
static getDataTypeDefinitions (ContainerInterface $services=null)
 
static getEntitySourceDefinitions (ContainerInterface $services=null)
 
static getEntityTypeDefinitions (ContainerInterface $services=null)
 
static getDataTypeFactory (ContainerInterface $services=null)
 
static getEntityIdParser (ContainerInterface $services=null)
 
static getEntityIdComposer (ContainerInterface $services=null)
 
static getSingleEntitySourceServicesFactory (ContainerInterface $services=null)
 
static getWikibaseServices (ContainerInterface $services=null)
 
static getDataAccessSettings (ContainerInterface $services=null)
 
static getEntityLookup (ContainerInterface $services=null)
 
static getTermBuffer (ContainerInterface $services=null)
 
static getAliasTermBuffer (ContainerInterface $services=null)
 
static getTermLookup (ContainerInterface $services=null)
 
static getPrefetchingTermLookupFactory (ContainerInterface $services=null)
 
static getPrefetchingTermLookup (ContainerInterface $services=null)
 
static getRepoLinker (ContainerInterface $services=null)
 
static getLanguageFallbackChainFactory (ContainerInterface $services=null)
 
static getLanguageFallbackLabelDescriptionLookupFactory (ContainerInterface $services=null)
 
static getStore (ContainerInterface $services=null)
 
static getSettings (ContainerInterface $services=null)
 
static getDefaultInstance ( $reset='noreset')
 IMPORTANT: Use only when it is not feasible to inject an instance properly. More...
 
static getLogger (ContainerInterface $services=null)
 
static getSite (ContainerInterface $services=null)
 Returns the this client wiki's site object. More...
 
static getLangLinkSiteGroup (ContainerInterface $services=null)
 Returns the site group ID for the group to be used for language links. More...
 
static getSiteGroup (ContainerInterface $services=null)
 Get site group ID. More...
 
static getValueFormatterFactory (ContainerInterface $services=null)
 Returns a OutputFormatValueFormatterFactory the provides ValueFormatters for different output formats. More...
 
static getRepoItemUriParser (ContainerInterface $services=null)
 
static getNamespaceChecker (ContainerInterface $services=null)
 
static getBaseDataModelDeserializerFactory (ContainerInterface $services=null)
 
static getCompactBaseDataModelSerializerFactory (ContainerInterface $services=null)
 Returns a SerializerFactory creating serializers that generate the most compact serialization. More...
 
static getCompactEntitySerializer (ContainerInterface $services=null)
 Returns an entity serializer that generates the most compact serialization. More...
 
static getDataValueDeserializer (ContainerInterface $services=null)
 
static getEntityChangeFactory (ContainerInterface $services=null)
 
static getEntityDiffer (ContainerInterface $services=null)
 
static getOtherProjectsSitesProvider (ContainerInterface $services=null)
 
static getAffectedPagesFinder (containerInterface $services=null)
 
static getChangeHandler (containerInterface $services=null)
 
static getRecentChangeFactory (ContainerInterface $services=null)
 
static getExternalUserNames (ContainerInterface $services=null)
 Returns an ExternalUserNames that can be used to link to the item and property source, if an interwiki prefix for that source (and its site) is known. More...
 
static getItemAndPropertySource (ContainerInterface $services=null)
 
static getWikibaseContentLanguages (ContainerInterface $services=null)
 
static getPropertyOrderProvider (ContainerInterface $services=null)
 
static getEntityNamespaceLookup (ContainerInterface $services=null)
 
static getTermFallbackCache (ContainerInterface $services=null)
 
static getTermFallbackCacheFactory (ContainerInterface $services=null)
 
static getEntityIdLookup (ContainerInterface $services=null)
 
static getDescriptionLookup (ContainerInterface $services=null)
 
static getPropertyLabelResolver (ContainerInterface $services=null)
 
static getItemSource (ContainerInterface $services=null)
 
static getPropertySource (ContainerInterface $services=null)
 

Private Member Functions

 newWikibaseValueFormatterBuilders (array $thumbLimits)
 Returns a low level factory object for creating formatters for well known data types. More...
 
 useKartographerGlobeCoordinateFormatter ()
 
 newWikibaseSnakFormatterBuilders (WikibaseValueFormatterBuilders $valueFormatterBuilders)
 Returns a low level factory object for creating formatters for well known data types. More...
 
 getUserLanguage ()
 
 getSnakFormatterFactory ()
 Returns a OutputFormatSnakFormatterFactory the provides SnakFormatters for different output formats. More...
 
 getStatementGroupRendererFactory ()
 

Static Private Member Functions

static newInstance ()
 Returns a new instance constructed from global settings. More...
 

Private Attributes

 $siteLookup
 
 $propertyDataTypeLookup = null
 
 $snakFormatterFactory = null
 
 $parserOutputDataUpdater = null
 
 $restrictedEntityLookup = null
 
 $sidebarLinkBadgeDisplay = null
 
 $valueFormatterBuilders = null
 
 $referenceFormatterFactory = null
 

Static Private Attributes

static $defaultInstance = null
 
static $defaultSnakFormatterBuilders = null
 

Detailed Description

Top level factory for the WikibaseClient extension.

Author
Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >
Daniel Kinzler

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Client\WikibaseClient::__construct ( SiteLookup  $siteLookup)

Member Function Documentation

◆ getAffectedPagesFinder()

static Wikibase\Client\WikibaseClient::getAffectedPagesFinder ( containerInterface  $services = null)
static

◆ getAliasTermBuffer()

static Wikibase\Client\WikibaseClient::getAliasTermBuffer ( ContainerInterface  $services = null)
static

◆ getBaseDataModelDeserializerFactory()

static Wikibase\Client\WikibaseClient::getBaseDataModelDeserializerFactory ( ContainerInterface  $services = null)
static

◆ getChangeHandler()

static Wikibase\Client\WikibaseClient::getChangeHandler ( containerInterface  $services = null)
static

◆ getCompactBaseDataModelSerializerFactory()

static Wikibase\Client\WikibaseClient::getCompactBaseDataModelSerializerFactory ( ContainerInterface  $services = null)
static

Returns a SerializerFactory creating serializers that generate the most compact serialization.

A factory returned has knowledge about items, properties, and the elements they are made of, but no other entity types.

◆ getCompactEntitySerializer()

static Wikibase\Client\WikibaseClient::getCompactEntitySerializer ( ContainerInterface  $services = null)
static

Returns an entity serializer that generates the most compact serialization.

◆ getContentLanguage()

Wikibase\Client\WikibaseClient::getContentLanguage ( )
Exceptions
MWExceptionwhen called to early

Before this constant is defined, custom config may not have been taken into account. So try not to allow code to use a language before that point. This code was explicitly mentioning the SetupAfterCache hook. With services, that hook won't be a problem anymore. So this check may well be unnecessary (but better safe than sorry).

◆ getDataAccessSettings()

static Wikibase\Client\WikibaseClient::getDataAccessSettings ( ContainerInterface  $services = null)
static

◆ getDataAccessSnakFormatterFactory()

Wikibase\Client\WikibaseClient::getDataAccessSnakFormatterFactory ( )

◆ getDataTypeDefinitions()

static Wikibase\Client\WikibaseClient::getDataTypeDefinitions ( ContainerInterface  $services = null)
static

◆ getDataTypeFactory()

static Wikibase\Client\WikibaseClient::getDataTypeFactory ( ContainerInterface  $services = null)
static

◆ getDataValueDeserializer()

static Wikibase\Client\WikibaseClient::getDataValueDeserializer ( ContainerInterface  $services = null)
static

◆ getDefaultInstance()

static Wikibase\Client\WikibaseClient::getDefaultInstance (   $reset = 'noreset')
static

IMPORTANT: Use only when it is not feasible to inject an instance properly.

Parameters
string$resetFlag: Pass "reset" to reset the default instance
Returns
self

◆ getDefaultSnakFormatterBuilders()

static Wikibase\Client\WikibaseClient::getDefaultSnakFormatterBuilders ( )
static
Warning
This is for use with bootstrap code in WikibaseClient.datatypes.php only! Program logic should use WikibaseClient::getSnakFormatterFactory() instead!
Returns
WikibaseSnakFormatterBuilders

◆ getDefaultValueFormatterBuilders()

static Wikibase\Client\WikibaseClient::getDefaultValueFormatterBuilders ( )
static
Warning
This is for use with bootstrap code in WikibaseClient.datatypes.php only! Program logic should use WikibaseClient::getSnakFormatterFactory() instead!
Returns
WikibaseValueFormatterBuilders

◆ getDescriptionLookup()

static Wikibase\Client\WikibaseClient::getDescriptionLookup ( ContainerInterface  $services = null)
static

◆ getEntityChangeFactory()

static Wikibase\Client\WikibaseClient::getEntityChangeFactory ( ContainerInterface  $services = null)
static

◆ getEntityDiffer()

static Wikibase\Client\WikibaseClient::getEntityDiffer ( ContainerInterface  $services = null)
static

◆ getEntityIdComposer()

static Wikibase\Client\WikibaseClient::getEntityIdComposer ( ContainerInterface  $services = null)
static

◆ getEntityIdLookup()

static Wikibase\Client\WikibaseClient::getEntityIdLookup ( ContainerInterface  $services = null)
static

◆ getEntityIdParser()

static Wikibase\Client\WikibaseClient::getEntityIdParser ( ContainerInterface  $services = null)
static

◆ getEntityLookup()

static Wikibase\Client\WikibaseClient::getEntityLookup ( ContainerInterface  $services = null)
static

◆ getEntityNamespaceLookup()

static Wikibase\Client\WikibaseClient::getEntityNamespaceLookup ( ContainerInterface  $services = null)
static

◆ getEntitySourceDefinitions()

static Wikibase\Client\WikibaseClient::getEntitySourceDefinitions ( ContainerInterface  $services = null)
static

◆ getEntityTypeDefinitions()

static Wikibase\Client\WikibaseClient::getEntityTypeDefinitions ( ContainerInterface  $services = null)
static

◆ getExternalUserNames()

static Wikibase\Client\WikibaseClient::getExternalUserNames ( ContainerInterface  $services = null)
static

Returns an ExternalUserNames that can be used to link to the item and property source, if an interwiki prefix for that source (and its site) is known.

◆ getItemAndPropertySource()

static Wikibase\Client\WikibaseClient::getItemAndPropertySource ( ContainerInterface  $services = null)
static

◆ getItemSource()

static Wikibase\Client\WikibaseClient::getItemSource ( ContainerInterface  $services = null)
static

◆ getLangLinkHandlerFactory()

Wikibase\Client\WikibaseClient::getLangLinkHandlerFactory ( )

◆ getLangLinkSiteGroup()

static Wikibase\Client\WikibaseClient::getLangLinkSiteGroup ( ContainerInterface  $services = null)
static

Returns the site group ID for the group to be used for language links.

This is typically the group the client wiki itself belongs to, but can be configured to be otherwise using the languageLinkSiteGroup setting.

◆ getLanguageFallbackChainFactory()

static Wikibase\Client\WikibaseClient::getLanguageFallbackChainFactory ( ContainerInterface  $services = null)
static

◆ getLanguageFallbackLabelDescriptionLookupFactory()

static Wikibase\Client\WikibaseClient::getLanguageFallbackLabelDescriptionLookupFactory ( ContainerInterface  $services = null)
static

◆ getLanguageLinkBadgeDisplay()

Wikibase\Client\WikibaseClient::getLanguageLinkBadgeDisplay ( )

◆ getLogger()

static Wikibase\Client\WikibaseClient::getLogger ( ContainerInterface  $services = null)
static

◆ getLuaEntityModules()

Wikibase\Client\WikibaseClient::getLuaEntityModules ( )
Returns
string[]

◆ getNamespaceChecker()

static Wikibase\Client\WikibaseClient::getNamespaceChecker ( ContainerInterface  $services = null)
static

◆ getOtherProjectsSidebarGeneratorFactory()

Wikibase\Client\WikibaseClient::getOtherProjectsSidebarGeneratorFactory ( )

◆ getOtherProjectsSitesProvider()

static Wikibase\Client\WikibaseClient::getOtherProjectsSitesProvider ( ContainerInterface  $services = null)
static

◆ getParserOutputDataUpdater()

Wikibase\Client\WikibaseClient::getParserOutputDataUpdater ( )

◆ getPrefetchingTermLookup()

static Wikibase\Client\WikibaseClient::getPrefetchingTermLookup ( ContainerInterface  $services = null)
static

◆ getPrefetchingTermLookupFactory()

static Wikibase\Client\WikibaseClient::getPrefetchingTermLookupFactory ( ContainerInterface  $services = null)
static

◆ getPropertyDataTypeLookup()

Wikibase\Client\WikibaseClient::getPropertyDataTypeLookup ( )

◆ getPropertyLabelResolver()

static Wikibase\Client\WikibaseClient::getPropertyLabelResolver ( ContainerInterface  $services = null)
static

◆ getPropertyOrderProvider()

static Wikibase\Client\WikibaseClient::getPropertyOrderProvider ( ContainerInterface  $services = null)
static

◆ getPropertyParserFunctionRunner()

Wikibase\Client\WikibaseClient::getPropertyParserFunctionRunner ( )

◆ getPropertySource()

static Wikibase\Client\WikibaseClient::getPropertySource ( ContainerInterface  $services = null)
static

◆ getRecentChangeFactory()

static Wikibase\Client\WikibaseClient::getRecentChangeFactory ( ContainerInterface  $services = null)
static

◆ getReferenceFormatterFactory()

Wikibase\Client\WikibaseClient::getReferenceFormatterFactory ( )

◆ getRepoItemUriParser()

static Wikibase\Client\WikibaseClient::getRepoItemUriParser ( ContainerInterface  $services = null)
static

◆ getRepoLinker()

static Wikibase\Client\WikibaseClient::getRepoLinker ( ContainerInterface  $services = null)
static

◆ getRestrictedEntityLookup()

Wikibase\Client\WikibaseClient::getRestrictedEntityLookup ( )

◆ getSettings()

static Wikibase\Client\WikibaseClient::getSettings ( ContainerInterface  $services = null)
static

◆ getSidebarLinkBadgeDisplay()

Wikibase\Client\WikibaseClient::getSidebarLinkBadgeDisplay ( )

◆ getSingleEntitySourceServicesFactory()

static Wikibase\Client\WikibaseClient::getSingleEntitySourceServicesFactory ( ContainerInterface  $services = null)
static
Deprecated:
DO NOT USE THIS SERVICE! This is just a temporary convenience placeholder until we finish migrating SingleEntitySourceServices.

Will be removed with T277731

◆ getSite()

static Wikibase\Client\WikibaseClient::getSite ( ContainerInterface  $services = null)
static

Returns the this client wiki's site object.

This is taken from the siteGlobalID setting, which defaults to the wiki's database name.

If the configured site ID is not found in the sites table, a new Site object is constructed from the configured ID.

◆ getSiteGroup()

static Wikibase\Client\WikibaseClient::getSiteGroup ( ContainerInterface  $services = null)
static

Get site group ID.

◆ getSnakFormatterFactory()

Wikibase\Client\WikibaseClient::getSnakFormatterFactory ( )
private

Returns a OutputFormatSnakFormatterFactory the provides SnakFormatters for different output formats.

◆ getStatementGroupRendererFactory()

Wikibase\Client\WikibaseClient::getStatementGroupRendererFactory ( )
private

◆ getStore()

static Wikibase\Client\WikibaseClient::getStore ( ContainerInterface  $services = null)
static

◆ getStringNormalizer()

Wikibase\Client\WikibaseClient::getStringNormalizer ( ContainerInterface  $services = null)

◆ getTermBuffer()

static Wikibase\Client\WikibaseClient::getTermBuffer ( ContainerInterface  $services = null)
static

◆ getTermFallbackCache()

static Wikibase\Client\WikibaseClient::getTermFallbackCache ( ContainerInterface  $services = null)
static

◆ getTermFallbackCacheFactory()

static Wikibase\Client\WikibaseClient::getTermFallbackCacheFactory ( ContainerInterface  $services = null)
static

◆ getTermLookup()

static Wikibase\Client\WikibaseClient::getTermLookup ( ContainerInterface  $services = null)
static

◆ getTermsLanguages()

Wikibase\Client\WikibaseClient::getTermsLanguages ( )

Get a ContentLanguages object holding the languages available for labels, descriptions and aliases.

◆ getUserLanguage()

Wikibase\Client\WikibaseClient::getUserLanguage ( )
private
Exceptions
MWExceptionwhen called to early

◆ getValueFormatterFactory()

static Wikibase\Client\WikibaseClient::getValueFormatterFactory ( ContainerInterface  $services = null)
static

Returns a OutputFormatValueFormatterFactory the provides ValueFormatters for different output formats.

◆ getWikibaseContentLanguages()

static Wikibase\Client\WikibaseClient::getWikibaseContentLanguages ( ContainerInterface  $services = null)
static

◆ getWikibaseServices()

static Wikibase\Client\WikibaseClient::getWikibaseServices ( ContainerInterface  $services = null)
static

◆ newInstance()

static Wikibase\Client\WikibaseClient::newInstance ( )
staticprivate

Returns a new instance constructed from global settings.

IMPORTANT: Use only when it is not feasible to inject an instance properly.

Exceptions
MWException
Returns
self

◆ newWikibaseSnakFormatterBuilders()

Wikibase\Client\WikibaseClient::newWikibaseSnakFormatterBuilders ( WikibaseValueFormatterBuilders  $valueFormatterBuilders)
private

Returns a low level factory object for creating formatters for well known data types.

Warning
This is for use with getDefaultValueFormatterBuilders() during bootstrap only! Program logic should use WikibaseClient::getSnakFormatterFactory() instead!
Parameters
WikibaseValueFormatterBuilders$valueFormatterBuilders
Returns
WikibaseSnakFormatterBuilders

◆ newWikibaseValueFormatterBuilders()

Wikibase\Client\WikibaseClient::newWikibaseValueFormatterBuilders ( array  $thumbLimits)
private

Returns a low level factory object for creating formatters for well known data types.

Warning
This is for use with getDefaultValueFormatterBuilders() during bootstrap only! Program logic should use WikibaseClient::getSnakFormatterFactory() instead!
Parameters
array$thumbLimits
Returns
WikibaseValueFormatterBuilders

◆ useKartographerGlobeCoordinateFormatter()

Wikibase\Client\WikibaseClient::useKartographerGlobeCoordinateFormatter ( )
private
Returns
bool

Member Data Documentation

◆ $defaultInstance

Wikibase\Client\WikibaseClient::$defaultInstance = null
staticprivate

◆ $defaultSnakFormatterBuilders

Wikibase\Client\WikibaseClient::$defaultSnakFormatterBuilders = null
staticprivate

◆ $parserOutputDataUpdater

Wikibase\Client\WikibaseClient::$parserOutputDataUpdater = null
private

◆ $propertyDataTypeLookup

Wikibase\Client\WikibaseClient::$propertyDataTypeLookup = null
private

◆ $referenceFormatterFactory

Wikibase\Client\WikibaseClient::$referenceFormatterFactory = null
private

◆ $restrictedEntityLookup

Wikibase\Client\WikibaseClient::$restrictedEntityLookup = null
private

◆ $sidebarLinkBadgeDisplay

Wikibase\Client\WikibaseClient::$sidebarLinkBadgeDisplay = null
private

◆ $siteLookup

Wikibase\Client\WikibaseClient::$siteLookup
private

◆ $snakFormatterFactory

Wikibase\Client\WikibaseClient::$snakFormatterFactory = null
private

◆ $valueFormatterBuilders

Wikibase\Client\WikibaseClient::$valueFormatterBuilders = null
private

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