Dispatching implementation of ValueSnakRdfBuilder.
More...
|
| __construct (array $valueBuilders, LoggerInterface $logger=null) |
|
| addValue (RdfWriter $writer, $propertyValueNamespace, $propertyValueLName, $dataType, $snakNamespace, PropertyValueSnak $snak) |
| Adds specific value. More...
|
|
Dispatching implementation of ValueSnakRdfBuilder.
This allows extensions to register ValueSnakRdfBuilders for custom data types.
- Copyright
- GPL-2.0-or-later
- Author
- Daniel Kinzler
◆ __construct()
Wikibase\Repo\Rdf\DispatchingValueSnakRdfBuilder::__construct |
( |
array |
$valueBuilders, |
|
|
LoggerInterface |
$logger = null |
|
) |
| |
- Parameters
-
ValueSnakRdfBuilder[] | $valueBuilders | ValueSnakRdfBuilder objects keyed by data type (with prefix "PT:") or value type (with prefix "VT:"). |
LoggerInterface | null | $logger | Used to log a warning when encountering a value without a builder in $valueBuilders. |
◆ addValue()
Wikibase\Repo\Rdf\DispatchingValueSnakRdfBuilder::addValue |
( |
RdfWriter |
$writer, |
|
|
|
$propertyValueNamespace, |
|
|
|
$propertyValueLName, |
|
|
|
$dataType, |
|
|
|
$snakNamespace, |
|
|
PropertyValueSnak |
$snak |
|
) |
| |
Adds specific value.
- Parameters
-
RdfWriter | $writer | |
string | $propertyValueNamespace | Property value relation namespace |
string | $propertyValueLName | Property value relation name |
string | $dataType | Property 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
◆ $logger
Wikibase\Repo\Rdf\DispatchingValueSnakRdfBuilder::$logger |
|
private |
◆ $valueBuilders
Wikibase\Repo\Rdf\DispatchingValueSnakRdfBuilder::$valueBuilders |
|
private |
The documentation for this class was generated from the following file: