Constants

CATEGORY_WEIGHT_AND_MASS

CATEGORY_WEIGHT_AND_MASS = 'Weight and Mass'

CATEGORY_DISTANCE

CATEGORY_DISTANCE = 'Distance'

CATEGORY_TIME

CATEGORY_TIME = 'Time'

CATEGORY_PRESSURE

CATEGORY_PRESSURE = 'Pressure'

CATEGORY_FORCE

CATEGORY_FORCE = 'Force'

CATEGORY_ENERGY

CATEGORY_ENERGY = 'Energy'

CATEGORY_POWER

CATEGORY_POWER = 'Power'

CATEGORY_MAGNETISM

CATEGORY_MAGNETISM = 'Magnetism'

CATEGORY_TEMPERATURE

CATEGORY_TEMPERATURE = 'Temperature'

CATEGORY_VOLUME

CATEGORY_VOLUME = 'Volume and Liquid Measure'

CATEGORY_AREA

CATEGORY_AREA = 'Area'

CATEGORY_INFORMATION

CATEGORY_INFORMATION = 'Information'

CATEGORY_SPEED

CATEGORY_SPEED = 'Speed'

Properties

$conversionUnits

$conversionUnits : array

Details of the Units of measure that can be used in CONVERTUOM().

Type

array

$conversionMultipliers

$conversionMultipliers : array

Details of the Multiplier prefixes that can be used with Units of Measure in CONVERTUOM().

Type

array

$binaryConversionMultipliers

$binaryConversionMultipliers : array

Details of the Multiplier prefixes that can be used with Units of Measure in CONVERTUOM().

Type

array

$unitConversions

$unitConversions : array

Details of the Units of measure conversion factors, organised by group.

Type

array

Methods

getConversionCategories()

getConversionCategories() : array

getConversionGroups Returns a list of the different conversion groups for UOM conversions.

Returns

array —

getConversionCategoryUnits()

getConversionCategoryUnits(string  $category = null) : array

getConversionGroupUnits Returns an array of units of measure, for a specified conversion group, or for all groups.

Parameters

string $category

The group whose units of measure you want to retrieve

Returns

array —

getConversionCategoryUnitDetails()

getConversionCategoryUnitDetails(string  $category = null) : array

getConversionGroupUnitDetails.

Parameters

string $category

The group whose units of measure you want to retrieve

Returns

array —

getConversionMultipliers()

getConversionMultipliers() : array

getConversionMultipliers Returns an array of the Multiplier prefixes that can be used with Units of Measure in CONVERTUOM().

Returns

array —

of mixed

getBinaryConversionMultipliers()

getBinaryConversionMultipliers() : array

getBinaryConversionMultipliers Returns an array of the additional Multiplier prefixes that can be used with Information Units of Measure in CONVERTUOM().

Returns

array —

of mixed

CONVERT()

CONVERT(float|int  $value, string  $fromUOM, string  $toUOM) : float|string

CONVERT.

Converts a number from one measurement system to another. For example, CONVERT can translate a table of distances in miles to a table of distances in kilometers.

Excel Function: CONVERT(value,fromUOM,toUOM)

Parameters

float|int $value

the value in fromUOM to convert

string $fromUOM

the units for value

string $toUOM

the units for the result

Returns

float|string —

convertTemperature()

convertTemperature(string  $fromUOM, string  $toUOM, float|int  $value) : float|int

Parameters

string $fromUOM
string $toUOM
float|int $value

Returns

float|int —

getUOMDetails()

getUOMDetails(string  $uom) : mixed

Parameters

string $uom

Returns

mixed —

resolveTemperatureSynonyms()

resolveTemperatureSynonyms(string  $uom) : mixed

Parameters

string $uom

Returns

mixed —