Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\Rdf\DispatchingValueSnakRdfBuilder Class Reference

Dispatching implementation of ValueSnakRdfBuilder. More...

+ Inheritance diagram for Wikibase\Repo\Rdf\DispatchingValueSnakRdfBuilder:
+ Collaboration diagram for Wikibase\Repo\Rdf\DispatchingValueSnakRdfBuilder:

Public Member Functions

 __construct (array $valueBuilders)
 
 addValue (RdfWriter $writer, $propertyValueNamespace, $propertyValueLName, $dataType, $snakNamespace, PropertyValueSnak $snak)
 Adds specific value.
 

Private Member Functions

 getValueBuilder ( $dataTypeId, $dataValueType)
 

Private Attributes

 $valueBuilders
 

Detailed Description

Dispatching implementation of ValueSnakRdfBuilder.

This allows extensions to register ValueSnakRdfBuilders for custom data types.

Author
Daniel Kinzler

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Rdf\DispatchingValueSnakRdfBuilder::__construct ( array  $valueBuilders)
Parameters
ValueSnakRdfBuilder[]$valueBuildersValueSnakRdfBuilder objects keyed by data type (with prefix "PT:") or value type (with prefix "VT:").

Member Function Documentation

◆ addValue()

Wikibase\Repo\Rdf\DispatchingValueSnakRdfBuilder::addValue ( RdfWriter  $writer,
  $propertyValueNamespace,
  $propertyValueLName,
  $dataType,
  $snakNamespace,
PropertyValueSnak  $snak 
)

Adds specific value.

Parameters
RdfWriter$writer
string$propertyValueNamespaceProperty value relation namespace
string$propertyValueLNameProperty value relation name
string$dataTypeProperty data type
PropertyValueSnak$snak

Implements Wikibase\Repo\Rdf\ValueSnakRdfBuilder.

◆ getValueBuilder()

Wikibase\Repo\Rdf\DispatchingValueSnakRdfBuilder::getValueBuilder (   $dataTypeId,
  $dataValueType 
)
private
Parameters
string | null$dataTypeId
string$dataValueType
Returns
null|ValueSnakRdfBuilder

Member Data Documentation

◆ $valueBuilders

Wikibase\Repo\Rdf\DispatchingValueSnakRdfBuilder::$valueBuilders
private

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