Semantic MediaWiki and related extensions
|
Public Member Functions | |
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) | |
hasCallable ( $key) | |
getCallable ( $key) | |
clearCallable ( $key) | |
copyOptions (Options $options=null) | |
setOption ( $key, $value) | |
getOption ( $key, $default=false) | |
hasFeature ( $feature) | |
isEnabledFeature ( $feature) | |
checkConstraints () | |
Public Attributes | |
const | TYPE_ID = '_qty' |
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 () | |
initConversionData () | |
initDisplayData () | |
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 () | |
Protected Attributes | |
$m_unitfactors = false | |
$m_unitids = false | |
$m_displayunits = false | |
$m_mainunit = false | |
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 | |
Additional Inherited Members | |
Static Public Member Functions inherited from SMWDataValue | |
static | prepareValue (&$value, &$comparator) |
This datavalue implements unit support custom units, for which users have provided linear conversion factors within the wiki. Those user settings are retrieved from a property page associated with this object.
|
protected |
The remaining functions are relatively "private" but are kept protected since subclasses might exploit this to, e.g., "fake" conversion factors instead of getting them from the database. A cheap way of making built-in types. This method initializes $m_unitfactors, $m_unitids, and $m_mainunit.
|
protected |
This method initializes $m_displayunits.
|
protected |
NOTE We keep non-ID units unless the input unit is used, so display units can be used to pick the preferred form of a unit. Doing this requires us to recompute the conversion values whenever the m_unitin changes.
const SMWQuantityValue::TYPE_ID = '_qty' |
DV identifier