MeasureName uses ConstantsTrait
UN/CEFACT Unit of Measure Names, Symbols, and Codes Class (Recommendation 20).
This class provides an extended selection of the most commonly used codes across various commercial and logistical contexts.
For an exhaustive list and official documentation, please consult:
Tags
Table of Contents
Constants
- ACRE : string = 'Acre'
- ACRE_FOOT : string = 'Acre-Foot'
- AMPERE : string = 'Ampere'
- ANGULAR_DEGREE : string = 'Angular Degree'
- BAR : string = 'Bar'
- BARREL : string = 'Barrel'
- BECQUEREL : string = 'Becquerel'
- BIT : string = 'Bit'
- BYTE : string = 'Byte'
- CALORIE : string = 'Calorie'
- CARAT : string = 'Carat'
- CELSIUS : string = 'Degree Celsius'
- CENTILITRE : string = 'Centilitre'
- CENTIMETER : string = 'Centimeter'
- COULOMB : string = 'Coulomb'
- COUNT : string = 'Count'
- CUBIC_CENTIMETER : string = 'Cubic Centimeter'
- CUBIC_DECIMETER : string = 'Cubic Decimeter'
- CUBIC_FOOT : string = 'Cubic Foot'
- CUBIC_METER : string = 'Cubic Meter'
- DAY : string = 'Day'
- DECIBEL : string = 'Decibel'
- DOZEN : string = 'Dozen'
- FAHRENHEIT : string = 'Degree Fahrenheit'
- FARAD : string = 'Farad'
- FOOT : string = 'Foot'
- GIGABYTE : string = 'Gigabyte'
- GRAM : string = 'Gram'
- GRAY : string = 'Gray'
- GROSS : string = 'Gross'
- HECTARE : string = 'Hectare'
- HECTOMETER : string = 'Hectometer'
- HENRY : string = 'Henry'
- HERTZ : string = 'Hertz'
- HOUR : string = 'Hour'
- HUNDRED : string = 'Hundred'
- IMPERIAL_GALLON : string = 'Imperial Gallon'
- INCH : string = 'Inch'
- JOULE : string = 'Joule'
- KELVIN : string = 'Kelvin'
- KILOBYTE : string = 'Kilobyte'
- KILOCALORIE : string = 'Kilocalorie'
- KILOGRAM : string = 'Kilogram'
- KILOHERTZ : string = 'Kilohertz'
- KILOJOULE : string = 'Kilojoule'
- KILOMETER : string = 'Kilometer'
- KILOWATT : string = 'Kilowatt'
- KILOWATT_HOUR : string = 'Kilowatt-Hour'
- LITER : string = 'Liter'
- LUMEN : string = 'Lumen'
- LUX : string = 'Lux'
- MEGABYTE : string = 'Megabyte'
- MEGAHERTZ : string = 'Megahertz'
- METER : string = 'Meter'
- METRIC_TON : string = 'Metric Ton'
- MILE : string = 'Mile'
- MILLIBAR : string = 'Millibar'
- MILLIGRAM : string = 'Milligram'
- MILLILITER : string = 'Milliliter'
- MILLIMETER : string = 'Millimeter'
- MINUTE : string = 'Minute'
- MONTH : string = 'Month'
- NEWTON : string = 'Newton'
- NUMBER : string = 'Number'
- OHM : string = 'Ohm'
- OUNCE : string = 'Ounce'
- PAIR : string = 'Pair'
- PARTS_PER_MILLION : string = 'Parts Per Million'
- PASCAL : string = 'Pascal'
- PER_THOUSAND : string = 'Per Thousand'
- PERCENT : string = 'Percent'
- PIECE : string = 'Piece'
- POINT : string = 'Point'
- POUND : string = 'Pound'
- POUND_FORCE : string = 'Pound-force'
- POUND_PER_SQUARE_INCH : string = 'Pound per Square Inch'
- RADIAN : string = 'Radian'
- RATIO : string = 'Ratio'
- REVOLUTION_PER_MINUTE : string = 'Revolution per Minute'
- SCORE : string = 'Score'
- SECOND : string = 'Second'
- SIEMENS : string = 'Siemens'
- SIEVERT : string = 'Sievert'
- SQUARE_CENTIMETER : string = 'Square Centimeter'
- SQUARE_DECIMETER : string = 'Square Decimeter'
- SQUARE_FOOT : string = 'Square Foot'
- SQUARE_INCH : string = 'Square Inch'
- SQUARE_KILOMETER : string = 'Square Kilometer'
- SQUARE_METER : string = 'Square Meter'
- SQUARE_MILE : string = 'Square Mile'
- SQUARE_MILLIMETER : string = 'Square Millimeter'
- SQUARE_YARD : string = 'Square Yard'
- TEN_PAIRS : string = 'Ten Pairs'
- TESLA : string = 'Tesla'
- THOUSAND : string = 'Thousand'
- UNIT : string = 'Unit'
- UNIT_OF_CAPITAL : string = 'Unit of Capital'
- US_GALLON : string = 'US Gallon'
- VOLT : string = 'Volt'
- WATT : string = 'Watt'
- WEBER : string = 'Weber'
- WEEK : string = 'Week'
- YARD : string = 'Yard'
- YEAR : string = 'Year'
Properties
Methods
- getCode() : string|null
- Returns the official UN/CEFACT code for a given code.
- getFromCode() : string|null
- Returns the name with a specific unit code.
- getFromSymbol() : string|null
- Returns the name from a specific unit code symbol.
- getSymbol() : string|null
- Returns the official UN/CEFACT symbol for a given code.
- resetCaches() : void
- Reset the internal cache of the static methods.
Constants
ACRE
public
string
ACRE
= 'Acre'
ACRE_FOOT
public
string
ACRE_FOOT
= 'Acre-Foot'
AMPERE
public
string
AMPERE
= 'Ampere'
ANGULAR_DEGREE
public
string
ANGULAR_DEGREE
= 'Angular Degree'
BAR
public
string
BAR
= 'Bar'
BARREL
public
string
BARREL
= 'Barrel'
BECQUEREL
public
string
BECQUEREL
= 'Becquerel'
BIT
public
string
BIT
= 'Bit'
BYTE
public
string
BYTE
= 'Byte'
CALORIE
public
string
CALORIE
= 'Calorie'
CARAT
public
string
CARAT
= 'Carat'
CELSIUS
public
string
CELSIUS
= 'Degree Celsius'
CENTILITRE
public
string
CENTILITRE
= 'Centilitre'
CENTIMETER
public
string
CENTIMETER
= 'Centimeter'
COULOMB
public
string
COULOMB
= 'Coulomb'
COUNT
public
string
COUNT
= 'Count'
CUBIC_CENTIMETER
public
string
CUBIC_CENTIMETER
= 'Cubic Centimeter'
CUBIC_DECIMETER
public
string
CUBIC_DECIMETER
= 'Cubic Decimeter'
CUBIC_FOOT
public
string
CUBIC_FOOT
= 'Cubic Foot'
CUBIC_METER
public
string
CUBIC_METER
= 'Cubic Meter'
DAY
public
string
DAY
= 'Day'
DECIBEL
public
string
DECIBEL
= 'Decibel'
DOZEN
public
string
DOZEN
= 'Dozen'
FAHRENHEIT
public
string
FAHRENHEIT
= 'Degree Fahrenheit'
FARAD
public
string
FARAD
= 'Farad'
FOOT
public
string
FOOT
= 'Foot'
GIGABYTE
public
string
GIGABYTE
= 'Gigabyte'
GRAM
public
string
GRAM
= 'Gram'
GRAY
public
string
GRAY
= 'Gray'
GROSS
public
string
GROSS
= 'Gross'
HECTARE
public
string
HECTARE
= 'Hectare'
HECTOMETER
public
string
HECTOMETER
= 'Hectometer'
HENRY
public
string
HENRY
= 'Henry'
HERTZ
public
string
HERTZ
= 'Hertz'
HOUR
public
string
HOUR
= 'Hour'
HUNDRED
public
string
HUNDRED
= 'Hundred'
IMPERIAL_GALLON
public
string
IMPERIAL_GALLON
= 'Imperial Gallon'
INCH
public
string
INCH
= 'Inch'
JOULE
public
string
JOULE
= 'Joule'
KELVIN
public
string
KELVIN
= 'Kelvin'
KILOBYTE
public
string
KILOBYTE
= 'Kilobyte'
KILOCALORIE
public
string
KILOCALORIE
= 'Kilocalorie'
KILOGRAM
public
string
KILOGRAM
= 'Kilogram'
KILOHERTZ
public
string
KILOHERTZ
= 'Kilohertz'
KILOJOULE
public
string
KILOJOULE
= 'Kilojoule'
KILOMETER
public
string
KILOMETER
= 'Kilometer'
KILOWATT
public
string
KILOWATT
= 'Kilowatt'
KILOWATT_HOUR
public
string
KILOWATT_HOUR
= 'Kilowatt-Hour'
LITER
public
string
LITER
= 'Liter'
LUMEN
public
string
LUMEN
= 'Lumen'
LUX
public
string
LUX
= 'Lux'
MEGABYTE
public
string
MEGABYTE
= 'Megabyte'
MEGAHERTZ
public
string
MEGAHERTZ
= 'Megahertz'
METER
public
string
METER
= 'Meter'
METRIC_TON
public
string
METRIC_TON
= 'Metric Ton'
MILE
public
string
MILE
= 'Mile'
MILLIBAR
public
string
MILLIBAR
= 'Millibar'
MILLIGRAM
public
string
MILLIGRAM
= 'Milligram'
MILLILITER
public
string
MILLILITER
= 'Milliliter'
MILLIMETER
public
string
MILLIMETER
= 'Millimeter'
MINUTE
public
string
MINUTE
= 'Minute'
MONTH
public
string
MONTH
= 'Month'
NEWTON
public
string
NEWTON
= 'Newton'
NUMBER
public
string
NUMBER
= 'Number'
OHM
public
string
OHM
= 'Ohm'
OUNCE
public
string
OUNCE
= 'Ounce'
PAIR
public
string
PAIR
= 'Pair'
PARTS_PER_MILLION
public
string
PARTS_PER_MILLION
= 'Parts Per Million'
PASCAL
public
string
PASCAL
= 'Pascal'
PER_THOUSAND
public
string
PER_THOUSAND
= 'Per Thousand'
PERCENT
public
string
PERCENT
= 'Percent'
PIECE
public
string
PIECE
= 'Piece'
POINT
public
string
POINT
= 'Point'
POUND
public
string
POUND
= 'Pound'
POUND_FORCE
public
string
POUND_FORCE
= 'Pound-force'
POUND_PER_SQUARE_INCH
public
string
POUND_PER_SQUARE_INCH
= 'Pound per Square Inch'
RADIAN
public
string
RADIAN
= 'Radian'
RATIO
public
string
RATIO
= 'Ratio'
REVOLUTION_PER_MINUTE
public
string
REVOLUTION_PER_MINUTE
= 'Revolution per Minute'
SCORE
public
string
SCORE
= 'Score'
SECOND
public
string
SECOND
= 'Second'
SIEMENS
public
string
SIEMENS
= 'Siemens'
SIEVERT
public
string
SIEVERT
= 'Sievert'
SQUARE_CENTIMETER
public
string
SQUARE_CENTIMETER
= 'Square Centimeter'
SQUARE_DECIMETER
public
string
SQUARE_DECIMETER
= 'Square Decimeter'
SQUARE_FOOT
public
string
SQUARE_FOOT
= 'Square Foot'
SQUARE_INCH
public
string
SQUARE_INCH
= 'Square Inch'
SQUARE_KILOMETER
public
string
SQUARE_KILOMETER
= 'Square Kilometer'
SQUARE_METER
public
string
SQUARE_METER
= 'Square Meter'
SQUARE_MILE
public
string
SQUARE_MILE
= 'Square Mile'
SQUARE_MILLIMETER
public
string
SQUARE_MILLIMETER
= 'Square Millimeter'
SQUARE_YARD
public
string
SQUARE_YARD
= 'Square Yard'
TEN_PAIRS
public
string
TEN_PAIRS
= 'Ten Pairs'
TESLA
public
string
TESLA
= 'Tesla'
THOUSAND
public
string
THOUSAND
= 'Thousand'
UNIT
public
string
UNIT
= 'Unit'
UNIT_OF_CAPITAL
public
string
UNIT_OF_CAPITAL
= 'Unit of Capital'
US_GALLON
public
string
US_GALLON
= 'US Gallon'
VOLT
public
string
VOLT
= 'Volt'
WATT
public
string
WATT
= 'Watt'
WEBER
public
string
WEBER
= 'Weber'
WEEK
public
string
WEEK
= 'Week'
YARD
public
string
YARD
= 'Yard'
YEAR
public
string
YEAR
= 'Year'
Properties
$CODES
private
static array<string|int, mixed>|null
$CODES
= null
$SYMBOLS
private
static array<string|int, mixed>|null
$SYMBOLS
= null
Methods
getCode()
Returns the official UN/CEFACT code for a given code.
public
static getCode(string $name) : string|null
Parameters
- $name : string
Return values
string|null —The UN/CEFACT code or null if not found.
getFromCode()
Returns the name with a specific unit code.
public
static getFromCode(string $code) : string|null
Parameters
- $code : string
Return values
string|nullgetFromSymbol()
Returns the name from a specific unit code symbol.
public
static getFromSymbol(string $symbol) : string|null
Parameters
- $symbol : string
Return values
string|nullgetSymbol()
Returns the official UN/CEFACT symbol for a given code.
public
static getSymbol(string $code) : string|null
Parameters
- $code : string
Return values
string|null —The UN/CEFACT code (e.g., 'KGM') or null if not found.
resetCaches()
Reset the internal cache of the static methods.
public
static resetCaches() : void