Semantic MediaWiki and related extensions
Public Member Functions | Protected Attributes | List of all members
SMW\DataValues\UnitConversionFetcher Class Reference

Public Member Functions

 __construct (NumberValue $numberValue, CachedPropertyValuesPrefetcher $cachedPropertyValuesPrefetcher=null)
 
 getErrors ()
 
 getUnitIds ()
 
 getUnitFactors ()
 
 getMainUnit ()
 
 getPrefixalUnitPreference ()
 
 fetchConversionData (DIProperty $property)
 
 fetchCachedConversionData (DIProperty $property=null)
 

Protected Attributes

 $prefixalUnitPreference = array()
 

Detailed Description

Returns conversion data from a cache instance to enable a responsive query feedback and eliminate possible repeated DB requests.

The cache is evicted as soon as the property that contains "Corresponds to" is altered.

GNU GPL v2+

Since
2.4
Author
mwjames

Constructor & Destructor Documentation

SMW\DataValues\UnitConversionFetcher::__construct ( NumberValue  $numberValue,
CachedPropertyValuesPrefetcher  $cachedPropertyValuesPrefetcher = null 
)
Since
2.4
Parameters
NumberValue$numberValue
CachedPropertyValuesPrefetcher | null$cachedPropertyValuesPrefetcher

Member Function Documentation

SMW\DataValues\UnitConversionFetcher::fetchCachedConversionData ( DIProperty  $property = null)
Since
2.4
Parameters
DIProperty | null$property
SMW\DataValues\UnitConversionFetcher::fetchConversionData ( DIProperty  $property)
Since
2.4
Parameters
DIProperty$property
SMW\DataValues\UnitConversionFetcher::getErrors ( )
Since
2.4
Returns
array
SMW\DataValues\UnitConversionFetcher::getMainUnit ( )
Since
2.4
Returns
string
SMW\DataValues\UnitConversionFetcher::getPrefixalUnitPreference ( )
Since
2.4
Returns
array
SMW\DataValues\UnitConversionFetcher::getUnitFactors ( )
Since
2.4
Returns
array
SMW\DataValues\UnitConversionFetcher::getUnitIds ( )
Since
2.4
Returns
array

Member Data Documentation

SMW\DataValues\UnitConversionFetcher::$prefixalUnitPreference = array()
protected

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