Semantic MediaWiki and related extensions
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
SMW\DataValues\TemperatureValue Class Reference
Inheritance diagram for SMW\DataValues\TemperatureValue:
Inheritance graph
[legend]
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)
 
 getNumber ()
 
 getLocalizedFormattedNumber ( $value)
 
 getNormalizedFormattedNumber ( $value)
 
 getShortWikiText ( $linker=null)
 
 getShortHTMLText ( $linker=null)
 
 getLongWikiText ( $linker=null)
 
 getLongHTMLText ( $linker=null)
 
 getWikiValue ()
 
 getInfolinks ()
 
 getCanonicalMainUnit ()
 
 getConvertedUnitValues ()
 
 getUnit ()
 
 hasPrefixalUnitPreference ( $unit)
 
 normalizeUnit ( $unit)
 
 getUnitList ()
 
- Public Member Functions inherited from SMWDataValue
 __construct ( $typeid)
 
 getTypeID ()
 
 setUserValue ( $value, $caption=false)
 
 setDataItem (SMWDataItem $dataItem)
 
 setDataValueServiceFactory (DataValueServiceFactory $dataValueServiceFactory)
 
 setProperty (DIProperty $property)
 
 getProperty ()
 
 setContextPage (SMWDIWikiPage $contextPage=null)
 
 getContextPage ()
 
 setCaption ( $caption)
 
 getCaption ()
 
 getPreferredCaption ()
 
 setOutputFormat ( $formatString)
 
 getOutputFormat ()
 
 addError ( $error)
 
 addErrorMsg ( $error, $type=Message::TEXT)
 
 getErrorText ()
 
 getErrors ()
 
 getErrorsByType ( $type=null)
 
 getRestrictionError ()
 
 clearErrors ()
 
 getQueryDescription ( $value)
 
 getDataItem ()
 
 __toString ()
 
 getShortWikiText ( $linker=null)
 
 getShortHTMLText ( $linker=null)
 
 getLongWikiText ( $linker=null)
 
 getLongHTMLText ( $linker=null)
 
 getWikiValue ()
 
 getShortText ( $outputFormat, $linker=null)
 
 getLongText ( $outputFormat, $linker=null)
 
 getInfolinkText ( $outputFormat, $linker=null)
 
 getInfolinks ()
 
 getHash ()
 
 isNumeric ()
 
 isValid ()
 
 canUse ()
 
 isRestricted ()
 
 addCallable ( $key, callable $callable)
 
 getCallable ( $key)
 
 clearCallable ( $key)
 
 copyOptions (Options $options=null)
 
 setOption ( $key, $value)
 
 getOption ( $key, $default=false)
 
 hasFeature ( $feature)
 
 isEnabledFeature ( $feature)
 

Public Attributes

const TYPE_ID = '_tem'
 
- Public Attributes inherited from SMWNumberValue
const TYPE_ID = '_num'
 
const NO_DISP_PRECISION_LIMIT = 'num.no.displayprecision.limit'
 
const DECIMAL_SEPARATOR = 'decimal.separator'
 
const THOUSANDS_SEPARATOR = 'thousands.separator'
 
- 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'
 
const OPT_DISABLE_SERVICELINKS = 'disable.servicelinks'
 
const OPT_COMPACT_INFOLINKS = 'compact.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
 getOptions ()
 
 parseUserValue ( $value)
 
 loadDataItem (SMWDataItem $dataItem)
 
 getServiceLinkParams ()
 
 checkAllowedValues ()
 

Additional Inherited Members

- Static Public Member Functions inherited from SMWDataValue
static prepareValue (&$value, &$comparator)
 
- Protected Attributes inherited from SMWNumberValue
 $m_unitvalues
 
 $prefixalUnitPreference = []
 
 $m_unitin
 
 $precision = null
 
- Protected Attributes inherited from SMWDataValue
 $m_dataitem
 
 $m_property = null
 
 $m_contextPage = null
 
 $m_caption
 
 $m_typeid
 
 $m_outformat = false
 
 $restrictionError = 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

◆ __construct()

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

Member Function Documentation

◆ convertToMainUnit()

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

NumberValue::convertToMainUnit

◆ getUnit()

SMW\DataValues\TemperatureValue::getUnit ( )

NumberValue::getUnit

◆ getUnitID()

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

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

TODO possibly localise some of those strings

◆ getUnitList()

SMW\DataValues\TemperatureValue::getUnitList ( )

NumberValue::getUnitList

◆ makeConversionValues()

SMW\DataValues\TemperatureValue::makeConversionValues ( )
protected

NumberValue::makeConversionValues

◆ makeUserValue()

SMW\DataValues\TemperatureValue::makeUserValue ( )
protected

NumberValue::makeUserValue

Member Data Documentation

◆ TYPE_ID

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

DV identifier


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

About | General disclaimer | Privacy policy