Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\DataAccess\EntitySource Class Reference

An EntitySource includes information needed to interact with one or more entity types at a given source. More...

Public Member Functions

 __construct ( $name, $databaseName, array $entityNamespaceIdsAndSlots, $conceptBaseUri, $rdfNodeNamespacePrefix, $rdfPredicateNamespacePrefix, $interwikiPrefix)
 
 getDatabaseName ()
 
 getSourceName ()
 
 getEntityTypes ()
 
 getEntityNamespaceIds ()
 
 getEntitySlotNames ()
 
 getConceptBaseUri ()
 
 getRdfNodeNamespacePrefix ()
 
 getRdfPredicateNamespacePrefix ()
 
 getInterwikiPrefix ()
 

Private Member Functions

 assertEntityNamespaceIdsAndSlots (array $entityNamespaceIdsAndSlots)
 
 setEntityTypeData (array $entityNamespaceIdsAndSlots)
 

Private Attributes

 $sourceName
 
 $databaseName
 
 $entityTypes
 
 $entityNamespaceIds
 
 $entitySlots
 
 $conceptBaseUri
 
 $rdfNodeNamespacePrefix
 
 $rdfPredicateNamespacePrefix
 
 $interwikiPrefix
 

Detailed Description

An EntitySource includes information needed to interact with one or more entity types at a given source.

EntitySource can only currently be used via direct database access.

See also
EntitySourceDefinitions for defining multiple EntitySources within a single site.

Constructor & Destructor Documentation

◆ __construct()

Wikibase\DataAccess\EntitySource::__construct (   $name,
  $databaseName,
array  $entityNamespaceIdsAndSlots,
  $conceptBaseUri,
  $rdfNodeNamespacePrefix,
  $rdfPredicateNamespacePrefix,
  $interwikiPrefix 
)
Parameters
string$nameUnique name for the source for a given configuration / site, used for indexing the sources internally. This does not have to be a wikiname, sitename or dbname, it can for example just be 'properties'.
string | false$databaseNameThe name of the database to use (use false for the local db)
array$entityNamespaceIdsAndSlotsAssociative array indexed by entity type (string), values are array of form [ 'namespaceId' => int, 'slot' => string ]
string$conceptBaseUri
string$rdfNodeNamespacePrefix
string$rdfPredicateNamespacePrefix
string$interwikiPrefix

Member Function Documentation

◆ assertEntityNamespaceIdsAndSlots()

Wikibase\DataAccess\EntitySource::assertEntityNamespaceIdsAndSlots ( array  $entityNamespaceIdsAndSlots)
private

◆ getConceptBaseUri()

Wikibase\DataAccess\EntitySource::getConceptBaseUri ( )

◆ getDatabaseName()

Wikibase\DataAccess\EntitySource::getDatabaseName ( )
Returns
string|false The name of the database to use (use false for the local db)

◆ getEntityNamespaceIds()

Wikibase\DataAccess\EntitySource::getEntityNamespaceIds ( )

◆ getEntitySlotNames()

Wikibase\DataAccess\EntitySource::getEntitySlotNames ( )

◆ getEntityTypes()

Wikibase\DataAccess\EntitySource::getEntityTypes ( )

◆ getInterwikiPrefix()

Wikibase\DataAccess\EntitySource::getInterwikiPrefix ( )

◆ getRdfNodeNamespacePrefix()

Wikibase\DataAccess\EntitySource::getRdfNodeNamespacePrefix ( )

◆ getRdfPredicateNamespacePrefix()

Wikibase\DataAccess\EntitySource::getRdfPredicateNamespacePrefix ( )

◆ getSourceName()

Wikibase\DataAccess\EntitySource::getSourceName ( )

◆ setEntityTypeData()

Wikibase\DataAccess\EntitySource::setEntityTypeData ( array  $entityNamespaceIdsAndSlots)
private

Member Data Documentation

◆ $conceptBaseUri

Wikibase\DataAccess\EntitySource::$conceptBaseUri
private

◆ $databaseName

Wikibase\DataAccess\EntitySource::$databaseName
private

◆ $entityNamespaceIds

Wikibase\DataAccess\EntitySource::$entityNamespaceIds
private

◆ $entitySlots

Wikibase\DataAccess\EntitySource::$entitySlots
private

◆ $entityTypes

Wikibase\DataAccess\EntitySource::$entityTypes
private

◆ $interwikiPrefix

Wikibase\DataAccess\EntitySource::$interwikiPrefix
private

◆ $rdfNodeNamespacePrefix

Wikibase\DataAccess\EntitySource::$rdfNodeNamespacePrefix
private

◆ $rdfPredicateNamespacePrefix

Wikibase\DataAccess\EntitySource::$rdfPredicateNamespacePrefix
private

◆ $sourceName

Wikibase\DataAccess\EntitySource::$sourceName
private

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