Semantic MediaWiki and related extensions
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
SMW\DataValues\TemperatureValue Class Reference
Collaboration diagram for SMW\DataValues\TemperatureValue:
Collaboration graph
[legend]

Public Member Functions

 __construct ($typeid= '')
 
 getUnitList ()
 
 getUnit ()
 
- Public Member Functions inherited from SMWNumberValue
 __construct ($typeid= '')
 
 parseNumberValue ($value, &$number, &$unit, &$asPrefix=false)
 
 setOutputFormat ($formatstring)
 
 getLocalizedFormattedNumber ($value)
 
 getNormalizedFormattedNumber ($value)
 
 getShortWikiText ($linker=null)
 
 getShortHTMLText ($linker=null)
 
 getLongWikiText ($linker=null)
 
 getLongHTMLText ($linker=null)
 
 getNumber ()
 
 getWikiValue ()
 
 getInfolinks ()
 
 getCanonicalMainUnit ()
 
 getConvertedUnitValues ()
 
 getUnit ()
 
 hasPrefixalUnitPreference ($unit)
 
 normalizeUnit ($unit)
 
 getUnitList ()
 
- Public Member Functions inherited from SMWDataValue
 __construct ($typeid)
 
 setUserValue ($value, $caption=false)
 
 setDataItem (SMWDataItem $dataItem)
 
 setDataValueServiceFactory ($dataValueServiceFactory)
 
 setProperty (SMWDIProperty $property)
 
 getProperty ()
 
 setContextPage (SMWDIWikiPage $contextPage=null)
 
 getContextPage ()
 
 setOptions (Options $options=null)
 
 setOption ($key, $value)
 
 getOption ($key)
 
 isEnabledFeature ($feature)
 
 setCaption ($caption)
 
 getCaption ()
 
 getPreferredCaption ()
 
 setOutputFormat ($formatString)
 
 getOutputFormat ()
 
 addError ($error)
 
 addErrorMsg ($parameters, $type=null)
 
 clearErrors ()
 
 getQueryDescription ($value)
 
 getDataItem ()
 
 __toString ()
 
 getShortWikiText ($linked=null)
 
 getShortHTMLText ($linker=null)
 
 getLongWikiText ($linked=null)
 
 getLongHTMLText ($linker=null)
 
 getShortText ($outputformat, $linker=null)
 
 getLongText ($outputformat, $linker=null)
 
 getInfolinkText ($outputformat, $linker=null)
 
 getWikiValue ()
 
 getTypeID ()
 
 getInfolinks ()
 
 getHash ()
 
 isNumeric ()
 
 isValid ()
 
 canUse ()
 
 getExtraneousFunctionFor ($name, array $parameters=array())
 
 getErrorText ()
 
 getErrors ()
 

Public Attributes

const TYPE_ID = '_tem'
 
- Public Attributes inherited from SMWNumberValue
const TYPE_ID = '_num'
 
const NO_DISP_PRECISION_LIMIT = 'num.no.displayprecision.limit'
 
- Public Attributes inherited from SMWDataValue
const OPT_USER_LANGUAGE = 'user.language'
 
const OPT_CONTENT_LANGUAGE = 'content.language'
 
const OPT_QUERY_CONTEXT = 'query.context'
 
const OPT_QUERY_COMP_CONTEXT = 'query.comparator.context'
 
const OPT_DISABLE_INFOLINKS = 'disable.infolinks'
 

Protected Member Functions

 convertToMainUnit ($number, $unit)
 
 makeConversionValues ()
 
 makeUserValue ()
 
 getUnitID ($unit)
 
- Protected Member Functions inherited from SMWNumberValue
 parseUserValue ($value)
 
 loadDataItem (SMWDataItem $dataItem)
 
 getServiceLinkParams ()
 
 convertToMainUnit ($number, $unit)
 
 makeConversionValues ()
 
 makeUserValue ()
 
 getPreferredDisplayPrecision ()
 
- Protected Member Functions inherited from SMWDataValue
 parseUserValue ($value)
 
 loadDataItem (SMWDataItem $dataItem)
 
 getServiceLinkParams ()
 
 checkAllowedValues ()
 
 getOptions ()
 

Additional Inherited Members

- Static Public Member Functions inherited from SMWDataValue
static prepareValue (&$value, &$comparator)
 
- Protected Attributes inherited from SMWNumberValue
 $m_unitvalues
 
 $prefixalUnitPreference = array()
 
 $m_unitin
 
 $precision = null
 
- Protected Attributes inherited from SMWDataValue
 $m_dataitem
 
 $m_property = null
 
 $m_contextPage = null
 
 $m_caption
 
 $m_typeid
 
 $m_outformat = false
 
 $dataValueServiceFactory
 

Detailed Description

This datavalue implements unit support for measuring temperatures. This is mostly an example implementation of how to realise custom unit types easily.

GNU GPL v2+

Since
2.4
Author
Markus Krötzsch
mwjames

Constructor & Destructor Documentation

SMW\DataValues\TemperatureValue::__construct (   $typeid = '')
Parameters
string$typeid

Member Function Documentation

SMW\DataValues\TemperatureValue::convertToMainUnit (   $number,
  $unit 
)
protected

NumberValue::convertToMainUnit

SMW\DataValues\TemperatureValue::getUnit ( )

NumberValue::getUnit

SMW\DataValues\TemperatureValue::getUnitID (   $unit)
protected

Helper method to find the main representation of a certain unit.

TODO possibly localise some of those strings

SMW\DataValues\TemperatureValue::getUnitList ( )

NumberValue::getUnitList

SMW\DataValues\TemperatureValue::makeConversionValues ( )
protected

NumberValue::makeConversionValues

SMW\DataValues\TemperatureValue::makeUserValue ( )
protected

NumberValue::makeUserValue

Member Data Documentation

const SMW\DataValues\TemperatureValue::TYPE_ID = '_tem'

DV identifier


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