Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
MathMLRdfBuilder | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
addValue | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Extension\MathSearch\Wikidata\MathML; |
4 | |
5 | use Wikibase\DataModel\Snak\PropertyValueSnak; |
6 | use Wikibase\Repo\Rdf\ValueSnakRdfBuilder; |
7 | use Wikimedia\Purtle\RdfWriter; |
8 | |
9 | class MathMLRdfBuilder implements ValueSnakRdfBuilder { |
10 | |
11 | /** |
12 | * Adds a value |
13 | * |
14 | * @param RdfWriter $writer |
15 | * @param string $propertyValueNamespace Property value relation namespace |
16 | * @param string $propertyValueLName Property value relation name |
17 | * @param string $dataType Property data type |
18 | * @param string $snakNamespace |
19 | * @param PropertyValueSnak $snak |
20 | */ |
21 | public function addValue( |
22 | RdfWriter $writer, $propertyValueNamespace, $propertyValueLName, $dataType, |
23 | $snakNamespace, PropertyValueSnak $snak |
24 | ) { |
25 | $writer->say( $propertyValueNamespace, $propertyValueLName )->value( $snak->getDataValue() |
26 | ->getValue(), 'http://www.w3.org/1998/Math/MathML' ); |
27 | } |
28 | } |