Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Lib\Formatters\TypedValueFormatter Interface Reference

Provides a string representation for a DataValue given its associated DataType. More...

+ Inheritance diagram for Wikibase\Lib\Formatters\TypedValueFormatter:

Public Member Functions

 formatValue (DataValue $value, $dataTypeId=null)
 Formats the given DataValue.
 

Detailed Description

Provides a string representation for a DataValue given its associated DataType.

Author
Daniel Kinzler

Member Function Documentation

◆ formatValue()

Wikibase\Lib\Formatters\TypedValueFormatter::formatValue ( DataValue $value,
$dataTypeId = null )

Formats the given DataValue.

If $dataTypeId is given, it may be used as a hint for providing more appropriate formatting.

Todo
make $dataTypeId mandatory.
Parameters
DataValue$value
string | null$dataTypeId
Exceptions
FormattingException
Returns
string

Implemented in Wikibase\Lib\Formatters\DispatchingValueFormatter.


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