text:
<?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category  Zend
 * @package   Zend_Measure
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd     New BSD License
 * @version   $Id: Weight.php 23775 2011-03-01 17:25:24Z ralph $
 */

/**
 * Implement needed classes
 */
require_once 'Zend/Measure/Abstract.php';
require_once 'Zend/Locale.php';

/**
 * Class for handling weight conversions
 *
 * @category   Zend
 * @package    Zend_Measure
 * @subpackage Zend_Measure_Weigth
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Measure_Weight extends Zend_Measure_Abstract
{
    const STANDARD = 'KILOGRAM';

    const ARRATEL                 = 'ARRATEL';
    const ARTEL                   = 'ARTEL';
    const ARROBA_PORTUGUESE       = 'ARROBA_PORTUGUESE';
    const ARROBA                  = 'ARROBA';
    const AS_                     = 'AS_';
    const ASS                     = 'ASS';
    const ATOMIC_MASS_UNIT_1960   = 'ATOMIC_MASS_UNIT_1960';
    const ATOMIC_MASS_UNIT_1973   = 'ATOMIC_MASS_UNIT_1973';
    const ATOMIC_MASS_UNIT_1986   = 'ATOMIC_MASS_UNIT_1986';
    const ATOMIC_MASS_UNIT        = 'ATOMIC_MASS_UNIT';
    const AVOGRAM                 = 'AVOGRAM';
    const BAG                     = 'BAG';
    const BAHT                    = 'BAHT';
    const BALE                    = 'BALE';
    const BALE_US                 = 'BALE_US';
    const BISMAR_POUND            = 'BISMAR_POUND';
    const CANDY                   = 'CANDY';
    const CARAT_INTERNATIONAL     = 'CARAT_INTERNATIONAL';
    const CARAT                   = 'CARAT';
    const CARAT_UK                = 'CARAT_UK';
    const CARAT_US_1913           = 'CARAT_US_1913';
    const CARGA                   = 'CARGA';
    const CATTI                   = 'CATTI';
    const CATTI_JAPANESE          = 'CATTI_JAPANESE';
    const CATTY                   = 'CATTY';
    const CATTY_JAPANESE          = 'CATTY_JAPANESE';
    const CATTY_THAI              = 'CATTY_THAI';
    const CENTAL                  = 'CENTAL';
    const CENTIGRAM               = 'CENTIGRAM';
    const CENTNER                 = 'CENTNER';
    const CENTNER_RUSSIAN         = 'CENTNER_RUSSIAN';
    const CHALDER                 = 'CHALDER';
    const CHALDRON                = 'CHALDRON';
    const CHIN                    = 'CHIN';
    const CHIN_JAPANESE           = 'CHIN_JAPANESE';
    const CLOVE                   = 'CLOVE';
    const CRITH                   = 'CRITH';
    const DALTON                  = 'DALTON';
    const DAN                     = 'DAN';
    const DAN_JAPANESE            = 'DAN_JAPANESE';
    const DECIGRAM                = 'DECIGRAM';
    const DECITONNE               = 'DECITONNE';
    const DEKAGRAM                = 'DEKAGRAM';
    const DEKATONNE               = 'DEKATONNE';
    const DENARO                  = 'DENARO';
    const DENIER                  = 'DENIER';
    const DRACHME                 = 'DRACHME';
    const DRAM                    = 'DRAM';
    const DRAM_APOTHECARIES       = 'DRAM_APOTHECARIES';
    const DYNE                    = 'DYNE';
    const ELECTRON                = 'ELECTRON';
    const ELECTRONVOLT            = 'ELECTRONVOLT';
    const ETTO                    = 'ETTO';
    const EXAGRAM                 = 'EXAGRAM';
    const FEMTOGRAM               = 'FEMTOGRAM';
    const FIRKIN                  = 'FIRKIN';
    const FLASK                   = 'FLASK';
    const FOTHER                  = 'FOTHER';
    const FOTMAL                  = 'FOTMAL';
    const FUNT                    = 'FUNT';
    const FUNTE                   = 'FUNTE';
    const GAMMA                   = 'GAMMA';
    const GIGAELECTRONVOLT        = 'GIGAELECTRONVOLT';
    const GIGAGRAM                = 'GIGAGRAM';
    const GIGATONNE               = 'GIGATONNE';
    const GIN                     = 'GIN';
    const GIN_JAPANESE            = 'GIN_JAPANESE';
    const GRAIN                   = 'GRAIN';
    const GRAM                    = 'GRAM';
    const GRAN                    = 'GRAN';
    const GRANO                   = 'GRANO';
    const GRANI                   = 'GRANI';
    const GROS                    = 'GROS';
    const HECTOGRAM               = 'HECTOGRAM';
    const HUNDRETWEIGHT           = 'HUNDRETWEIGHT';
    const HUNDRETWEIGHT_US        = 'HUNDRETWEIGHT_US';
    const HYL                     = 'HYL';
    const JIN                     = 'JIN';
    const JUPITER                 = 'JUPITER';
    const KATI                    = 'KATI';
    const KATI_JAPANESE           = 'KATI_JAPANESE';
    const KEEL                    = 'KEEL';
    const KEG                     = 'KEG';
    const KILODALTON              = 'KILODALTON';
    const KILOGRAM                = 'KILOGRAM';
    const KILOGRAM_FORCE          = 'KILOGRAM_FORCE';
    const KILOTON                 = 'KILOTON';
    const KILOTON_US              = 'KILOTON_US';
    const KILOTONNE               = 'KILOTONNE';
    const KIN                     = 'KIN';
    const KIP                     = 'KIP';
    const KOYAN                   = 'KOYAN';
    const KWAN                    = 'KWAN';
    const LAST_GERMANY            = 'LAST_GERMANY';
    const LAST                    = 'LAST';
    const LAST_WOOL               = 'LAST_WOOL';
    const LB                      = 'LB';
    const LBS                     = 'LBS';
    const LIANG                   = 'LIANG';
    const LIBRA_ITALIAN           = 'LIBRE_ITALIAN';
    const LIBRA_SPANISH           = 'LIBRA_SPANISH';
    const LIBRA_PORTUGUESE        = 'LIBRA_PORTUGUESE';
    const LIBRA_ANCIENT           = 'LIBRA_ANCIENT';
    const LIBRA                   = 'LIBRA';
    const LIVRE                   = 'LIVRE';
    const LONG_TON                = 'LONG_TON';
    const LOT                     = 'LOT';
    const MACE                    = 'MACE';
    const MAHND                   = 'MAHND';
    const MARC                    = 'MARC';
    const MARCO                   = 'MARCO';
    const MARK                    = 'MARK';
    const MARK_GERMAN             = 'MARK_GERMANY';
    const MAUND                   = 'MAUND';
    const MAUND_PAKISTAN          = 'MAUND_PAKISTAN';
    const MEGADALTON              = 'MEGADALTON';
    const MEGAGRAM                = 'MEGAGRAM';
    const MEGATONNE               = 'MEGATONNE';
    const MERCANTILE_POUND        = 'MERCANTILE_POUND';
    const METRIC_TON              = 'METRIC_TON';
    const MIC                     = 'MIC';
    const MICROGRAM               = 'MICROGRAM';
    const MILLIDALTON             = 'MILLIDALTON';
    const MILLIER                 = 'MILLIER';
    const MILLIGRAM               = 'MILLIGRAM';
    const MILLIMASS_UNIT          = 'MILLIMASS_UNIT';
    const MINA                    = 'MINA';
    const MOMME                   = 'MOMME';
    const MYRIAGRAM               = 'MYRIAGRAM';
    const NANOGRAM                = 'NANOGRAM';
    const NEWTON                  = 'NEWTON';
    const OBOL                    = 'OBOL';
    const OBOLOS                  = 'OBOLOS';
    const OBOLUS                  = 'OBOLUS';
    const OBOLOS_ANCIENT          = 'OBOLOS_ANCIENT';
    const OBOLUS_ANCIENT          = 'OBOLUS_ANCIENT';
    const OKA                     = 'OKA';
    const ONCA                    = 'ONCA';
    const ONCE                    = 'ONCE';
    const ONCIA                   = 'ONCIA';
    const ONZA                    = 'ONZA';
    const ONS                     = 'ONS';
    const OUNCE                   = 'OUNCE';
    const OUNCE_FORCE             = 'OUNCE_FORCE';
    const OUNCE_TROY              = 'OUNCE_TROY';
    const PACKEN                  = 'PACKEN';
    const PENNYWEIGHT             = 'PENNYWEIGHT';
    const PETAGRAM                = 'PETAGRAM';
    const PFUND                   = 'PFUND';
    const PICOGRAM                = 'PICOGRAM';
    const POINT                   = 'POINT';
    const POND                    = 'POND';
    const POUND                   = 'POUND';
    const POUND_FORCE             = 'POUND_FORCE';
    const POUND_METRIC            = 'POUND_METRIC';
    const POUND_TROY              = 'POUND_TROY';
    const PUD                     = 'PUD';
    const POOD                    = 'POOD';
    const PUND                    = 'PUND';
    const QIAN                    = 'QIAN';
    const QINTAR                  = 'QINTAR';
    const QUARTER                 = 'QUARTER';
    const QUARTER_US              = 'QUARTER_US';
    const QUARTER_TON             = 'QUARTER_TON';
    const QUARTERN                = 'QUARTERN';
    const QUARTERN_LOAF           = 'QUARTERN_LOAF';
    const QUINTAL_FRENCH          = 'QUINTAL_FRENCH';
    const QUINTAL                 = 'QUINTAL';
    const QUINTAL_PORTUGUESE      = 'QUINTAL_PORTUGUESE';
    const QUINTAL_SPAIN           = 'QUINTAL_SPAIN';
    const REBAH                   = 'REBAH';
    const ROTL                    = 'ROTL';
    const ROTEL                   = 'ROTEL';
    const ROTTLE                  = 'ROTTLE';
    const RATEL                   = 'RATEL';
    const SACK                    = 'SACK';
    const SCRUPLE                 = 'SCRUPLE';
    const SEER                    = 'SEER';
    const SEER_PAKISTAN           = 'SEER_PAKISTAN';
    const SHEKEL                  = 'SHEKEL';
    const SHORT_TON               = 'SHORT_TON';
    const SLINCH                  = 'SLINCH';
    const SLUG                    = 'SLUG';
    const STONE                   = 'STONE';
    const TAEL                    = 'TAEL';
    const TAHIL_JAPANESE          = 'TAHIL_JAPANESE';
    const TAHIL                   = 'TAHIL';
    const TALENT                  = 'TALENT';
    const TAN                     = 'TAN';
    const TECHNISCHE_MASS_EINHEIT = 'TECHNISCHE_MASS_EINHEIT';
    const TERAGRAM                = 'TERAGRAM';
    const TETRADRACHM             = 'TETRADRACHM';
    const TICAL                   = 'TICAL';
    const TOD                     = 'TOD';
    const TOLA                    = 'TOLA';
    const TOLA_PAKISTAN           = 'TOLA_PAKISTAN';
    const TON_UK                  = 'TON_UK';
    const TON                     = 'TON';
    const TON_US                  = 'TON_US';
    const TONELADA_PORTUGUESE     = 'TONELADA_PORTUGUESE';
    const TONELADA                = 'TONELADA';
    const TONNE                   = 'TONNE';
    const TONNEAU                 = 'TONNEAU';
    const TOVAR                   = 'TOVAR';
    const TROY_OUNCE              = 'TROY_OUNCE';
    const TROY_POUND              = 'TROY_POUND';
    const TRUSS                   = 'TRUSS';
    const UNCIA                   = 'UNCIA';
    const UNZE                    = 'UNZE';
    const VAGON                   = 'VAGON';
    const YOCTOGRAM               = 'YOCTOGRAM';
    const YOTTAGRAM               = 'YOTTAGRAM';
    const ZENTNER                 = 'ZENTNER';
    const ZEPTOGRAM               = 'ZEPTOGRAM';
    const ZETTAGRAM               = 'ZETTAGRAM';

    /**
     * Calculations for all weight units
     *
     * @var array
     */
    protected $_units = array(
        'ARRATEL'               => array('0.5',            'arratel'),
        'ARTEL'                 => array('0.5',            'artel'),
        'ARROBA_PORTUGUESE'     => array('14.69',          'arroba'),
        'ARROBA'                => array('11.502',         '@'),
        'AS_'                   => array('0.000052',       'as'),
        'ASS'                   => array('0.000052',       'ass'),
        'ATOMIC_MASS_UNIT_1960' => array('1.6603145e-27',  'amu'),
        'ATOMIC_MASS_UNIT_1973' => array('1.6605655e-27',  'amu'),
        'ATOMIC_MASS_UNIT_1986' => array('1.6605402e-27',  'amu'),
        'ATOMIC_MASS_UNIT'      => array('1.66053873e-27', 'amu'),
        'AVOGRAM'               => array('1.6605402e-27',  'avogram'),
        'BAG'                   => array('42.63768278',    'bag'),
        'BAHT'                  => array('0.015',          'baht'),
        'BALE'                  => array('326.5865064',    'bl'),
        'BALE_US'               => array('217.7243376',    'bl'),
        'BISMAR_POUND'          => array('5.993',          'bismar pound'),
        'CANDY'                 => array('254',            'candy'),
        'CARAT_INTERNATIONAL'   => array('0.0002',         'ct'),
        'CARAT'                 => array('0.0002',         'ct'),
        'CARAT_UK'              => array('0.00025919564',  'ct'),
        'CARAT_US_1913'         => array('0.0002053',      'ct'),
        'CARGA'                 => array('140',            'carga'),
        'CATTI'                 => array('0.604875',       'catti'),
        'CATTI_JAPANESE'        => array('0.594',          'catti'),
        'CATTY'                 => array('0.5',            'catty'),
        'CATTY_JAPANESE'        => array('0.6',            'catty'),
        'CATTY_THAI'            => array('0.6',            'catty'),
        'CENTAL'                => array('45.359237',      'cH'),
        'CENTIGRAM'             => array('0.00001',        'cg'),
        'CENTNER'               => array('50',             'centner'),
        'CENTNER_RUSSIAN'       => array('100',            'centner'),
        'CHALDER'               => array('2692.52',        'chd'),
        'CHALDRON'              => array('2692.52',        'chd'),
        'CHIN'                  => array('0.5',            'chin'),
        'CHIN_JAPANESE'         => array('0.6',            'chin'),
        'CLOVE'                 => array('3.175',          'clove'),
        'CRITH'                 => array('0.000089885',    'crith'),
        'DALTON'                => array('1.6605402e-27',  'D'),
        'DAN'                   => array('50',             'dan'),
        'DAN_JAPANESE'          => array('60',             'dan'),
        'DECIGRAM'              => array('0.0001',         'dg'),
        'DECITONNE'             => array('100',            'dt'),
        'DEKAGRAM'              => array('0.01',           'dag'),
        'DEKATONNE'             => array('10000',          'dat'),
        'DENARO'                => array('0.0011',         'denaro'),
        'DENIER'                => array('0.001275',       'denier'),
        'DRACHME'               => array('0.0038',         'drachme'),
        'DRAM'                  => array(array('' => '0.45359237', '/' => '256'), 'dr'),
        'DRAM_APOTHECARIES'     => array('0.0038879346',   'dr'),
        'DYNE'                  => array('1.0197162e-6',   'dyn'),
        'ELECTRON'              => array('9.109382e-31',   'e−'),
        'ELECTRONVOLT'          => array('1.782662e-36',   'eV'),
        'ETTO'                  => array('0.1',            'hg'),
        'EXAGRAM'               => array('1.0e+15',        'Eg'),
        'FEMTOGRAM'             => array('1.0e-18',        'fg'),
        'FIRKIN'                => array('25.40117272',    'fir'),
        'FLASK'                 => array('34.7',           'flask'),
        'FOTHER'                => array('979.7595192',    'fother'),
        'FOTMAL'                => array('32.65865064',    'fotmal'),
        'FUNT'                  => array('0.4095',         'funt'),
        'FUNTE'                 => array('0.4095',         'funte'),
        'GAMMA'                 => array('0.000000001',    'gamma'),
        'GIGAELECTRONVOLT'      => array('1.782662e-27',   'GeV'),
        'GIGAGRAM'              => array('1000000',        'Gg'),
        'GIGATONNE'             => array('1.0e+12',        'Gt'),
        'GIN'                   => array('0.6',            'gin'),
        'GIN_JAPANESE'          => array('0.594',          'gin'),
        'GRAIN'                 => array('0.00006479891',  'gr'),
        'GRAM'                  => array('0.001',          'g'),
        'GRAN'                  => array('0.00082',        'gran'),
        'GRANO'                 => array('0.00004905',     'grano'),
        'GRANI'                 => array('0.00004905',     'grani'),
        'GROS'                  => array('0.003824',       'gros'),
        'HECTOGRAM'             => array('0.1',            'hg'),
        'HUNDRETWEIGHT'         => array('50.80234544',    'cwt'),
        'HUNDRETWEIGHT_US'      => array('45.359237',      'cwt'),
        'HYL'                   => array('9.80665',        'hyl'),
        'JIN'                   => array('0.5',            'jin'),
        'JUPITER'               => array('1.899e+27',      'jupiter'),
        'KATI'                  => array('0.5',            'kati'),
        'KATI_JAPANESE'         => array('0.6',            'kati'),
        'KEEL'                  => array('21540.19446656', 'keel'),
        'KEG'                   => array('45.359237',      'keg'),
        'KILODALTON'            => array('1.6605402e-24',  'kD'),
        'KILOGRAM'              => array('1',              'kg'),
        'KILOGRAM_FORCE'        => array('1',              'kgf'),
        'KILOTON'               => array('1016046.9088',   'kt'),
        'KILOTON_US'            => array('907184.74',      'kt'),
        'KILOTONNE'             => array('1000000',        'kt'),
        'KIN'                   => array('0.6',            'kin'),
        'KIP'                   => array('453.59237',      'kip'),
        'KOYAN'                 => array('2419',           'koyan'),
        'KWAN'                  => array('3.75',           'kwan'),
        'LAST_GERMANY'          => array('2000',           'last'),
        'LAST'                  => array('1814.36948',     'last'),
        'LAST_WOOL'             => array('1981.29147216',  'last'),
        'LB'                    => array('0.45359237',     'lb'),
        'LBS'                   => array('0.45359237',     'lbs'),
        'LIANG'                 => array('0.05',           'liang'),
        'LIBRE_ITALIAN'         => array('0.339',          'lb'),
        'LIBRA_SPANISH'         => array('0.459',          'lb'),
        'LIBRA_PORTUGUESE'      => array('0.459',          'lb'),
        'LIBRA_ANCIENT'         => array('0.323',          'lb'),
        'LIBRA'                 => array('1',              'lb'),
        'LIVRE'                 => array('0.4895',         'livre'),
        'LONG_TON'              => array('1016.0469088',   't'),
        'LOT'                   => array('0.015',          'lot'),
        'MACE'                  => array('0.003778',       'mace'),
        'MAHND'                 => array('0.9253284348',   'mahnd'),
        'MARC'                  => array('0.24475',        'marc'),
        'MARCO'                 => array('0.23',           'marco'),
        'MARK'                  => array('0.2268',         'mark'),
        'MARK_GERMANY'          => array('0.2805',         'mark'),
        'MAUND'                 => array('37.3242',        'maund'),
        'MAUND_PAKISTAN'        => array('40',             'maund'),
        'MEGADALTON'            => array('1.6605402e-21',  'MD'),
        'MEGAGRAM'              => array('1000',           'Mg'),
        'MEGATONNE'             => array('1.0e+9',         'Mt'),
        'MERCANTILE_POUND'      => array('0.46655',        'lb merc'),
        'METRIC_TON'            => array('1000',           't'),
        'MIC'                   => array('1.0e-9',         'mic'),
        'MICROGRAM'             => array('1.0e-9',         '�g'),
        'MILLIDALTON'           => array('1.6605402e-30',  'mD'),
        'MILLIER'               => array('1000',           'millier'),
        'MILLIGRAM'             => array('0.000001',       'mg'),
        'MILLIMASS_UNIT'        => array('1.6605402e-30',  'mmu'),
        'MINA'                  => array('0.499',          'mina'),
        'MOMME'                 => array('0.00375',        'momme'),
        'MYRIAGRAM'             => array('10',             'myg'),
        'NANOGRAM'              => array('1.0e-12',        'ng'),
        'NEWTON'                => array('0.101971621',    'N'),
        'OBOL'                  => array('0.0001',         'obol'),
        'OBOLOS'                => array('0.0001',         'obolos'),
        'OBOLUS'                => array('0.0001',         'obolus'),
        'OBOLOS_ANCIENT'        => array('0.0005',         'obolos'),
        'OBOLUS_ANCIENT'        => array('0.00057',        'obolos'),
        'OKA'                   => array('1.28',           'oka'),
        'ONCA'                  => array('0.02869',        'onca'),
        'ONCE'                  => array('0.03059',        'once'),
        'ONCIA'                 => array('0.0273',         'oncia'),
        'ONZA'                  => array('0.02869',        'onza'),
        'ONS'                   => array('0.1',            'ons'),
        'OUNCE'                 => array(array('' => '0.45359237', '/' => '16'),    'oz'),
        'OUNCE_FORCE'           => array(array('' => '0.45359237', '/' => '16'),    'ozf'),
        'OUNCE_TROY'            => array(array('' => '65.31730128', '/' => '2100'), 'oz'),
        'PACKEN'                => array('490.79',         'packen'),
        'PENNYWEIGHT'           => array(array('' => '65.31730128', '/' => '42000'), 'dwt'),
        'PETAGRAM'              => array('1.0e+12',        'Pg'),
        'PFUND'                 => array('0.5',            'pfd'),
        'PICOGRAM'              => array('1.0e-15',        'pg'),
        'POINT'                 => array('0.000002',       'pt'),
        'POND'                  => array('0.5',            'pond'),
        'POUND'                 => array('0.45359237',     'lb'),
        'POUND_FORCE'           => array('0.4535237',      'lbf'),
        'POUND_METRIC'          => array('0.5',            'lb'),
        'POUND_TROY'            => array(array('' => '65.31730128', '/' => '175'), 'lb'),
        'PUD'                   => array('16.3',           'pud'),
        'POOD'                  => array('16.3',           'pood'),
        'PUND'                  => array('0.5',            'pund'),
        'QIAN'                  => array('0.005',          'qian'),
        'QINTAR'                => array('50',             'qintar'),
        'QUARTER'               => array('12.70058636',    'qtr'),
        'QUARTER_US'            => array('11.33980925',    'qtr'),
        'QUARTER_TON'           => array('226.796185',     'qtr'),
        'QUARTERN'              => array('1.587573295',    'quartern'),
        'QUARTERN_LOAF'         => array('1.81436948',     'quartern-loaf'),
        'QUINTAL_FRENCH'        => array('48.95',          'q'),
        'QUINTAL'               => array('100',            'q'),
        'QUINTAL_PORTUGUESE'    => array('58.752',         'q'),
        'QUINTAL_SPAIN'         => array('45.9',           'q'),
        'REBAH'                 => array('0.2855',         'rebah'),
        'ROTL'                  => array('0.5',            'rotl'),
        'ROTEL'                 => array('0.5',            'rotel'),
        'ROTTLE'                => array('0.5',            'rottle'),
        'RATEL'                 => array('0.5',            'ratel'),
        'SACK'                  => array('165.10762268',   'sack'),
        'SCRUPLE'               => array(array('' => '65.31730128', '/' => '50400'), 's'),
        'SEER'                  => array('0.933105',       'seer'),
        'SEER_PAKISTAN'         => array('1',              'seer'),
        'SHEKEL'                => array('0.01142',        'shekel'),
        'SHORT_TON'             => array('907.18474',      'st'),
        'SLINCH'                => array('175.126908',     'slinch'),
        'SLUG'                  => array('14.593903',      'slug'),
        'STONE'                 => array('6.35029318',     'st'),
        'TAEL'                  => array('0.03751',        'tael'),
        'TAHIL_JAPANESE'        => array('0.03751',        'tahil'),
        'TAHIL'                 => array('0.05',           'tahil'),
        'TALENT'                => array('30',             'talent'),
        'TAN'                   => array('50',             'tan'),
        'TECHNISCHE_MASS_EINHEIT' => array('9.80665',      'TME'),
        'TERAGRAM'              => array('1.0e+9',         'Tg'),
        'TETRADRACHM'           => array('0.014',          'tetradrachm'),
        'TICAL'                 => array('0.0164',         'tical'),
        'TOD'                   => array('12.70058636',    'tod'),
        'TOLA'                  => array('0.0116638125',   'tola'),
        'TOLA_PAKISTAN'         => array('0.0125',         'tola'),
        'TON_UK'                => array('1016.0469088',   't'),
        'TON'                   => array('1000',           't'),
        'TON_US'                => array('907.18474',      't'),
        'TONELADA_PORTUGUESE'   => array('793.15',         'tonelada'),
        'TONELADA'              => array('919.9',          'tonelada'),
        'TONNE'                 => array('1000',           't'),
        'TONNEAU'               => array('979',            'tonneau'),
        'TOVAR'                 => array('128.8',          'tovar'),
        'TROY_OUNCE'            => array(array('' => '65.31730128', '/' => '2100'), 'troy oz'),
        'TROY_POUND'            => array(array('' => '65.31730128', '/' => '175'),  'troy lb'),
        'TRUSS'                 => array('25.40117272',    'truss'),
        'UNCIA'                 => array('0.0272875',      'uncia'),
        'UNZE'                  => array('0.03125',        'unze'),
        'VAGON'                 => array('10000',          'vagon'),
        'YOCTOGRAM'             => array('1.0e-27',        'yg'),
        'YOTTAGRAM'             => array('1.0e+21',        'Yg'),
        'ZENTNER'               => array('50',             'Ztr'),
        'ZEPTOGRAM'             => array('1.0e-24',        'zg'),
        'ZETTAGRAM'             => array('1.0e+18',        'Zg'),
        'STANDARD'              => 'KILOGRAM'
    );
}


text:
<?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category  Zend
 * @package   Zend_Measure
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd     New BSD License
 * @version   $Id: Frequency.php 23775 2011-03-01 17:25:24Z ralph $
 */

/**
 * Implement needed classes
 */
require_once 'Zend/Measure/Abstract.php';
require_once 'Zend/Locale.php';

/**
 * Class for handling flow volume conversions
 *
 * @category   Zend
 * @package    Zend_Measure
 * @subpackage Zend_Measure_Frequency
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Measure_Frequency extends Zend_Measure_Abstract
{
    const STANDARD = 'HERTZ';

    const ONE_PER_SECOND        = 'ONE_PER_SECOND';
    const CYCLE_PER_SECOND      = 'CYCLE_PER_SECOND';
    const DEGREE_PER_HOUR       = 'DEGREE_PER_HOUR';
    const DEGREE_PER_MINUTE     = 'DEGREE_PER_MINUTE';
    const DEGREE_PER_SECOND     = 'DEGREE_PER_SECOND';
    const GIGAHERTZ             = 'GIGAHERTZ';
    const HERTZ                 = 'HERTZ';
    const KILOHERTZ             = 'KILOHERTZ';
    const MEGAHERTZ             = 'MEGAHERTZ';
    const MILLIHERTZ            = 'MILLIHERTZ';
    const RADIAN_PER_HOUR       = 'RADIAN_PER_HOUR';
    const RADIAN_PER_MINUTE     = 'RADIAN_PER_MINUTE';
    const RADIAN_PER_SECOND     = 'RADIAN_PER_SECOND';
    const REVOLUTION_PER_HOUR   = 'REVOLUTION_PER_HOUR';
    const REVOLUTION_PER_MINUTE = 'REVOLUTION_PER_MINUTE';
    const REVOLUTION_PER_SECOND = 'REVOLUTION_PER_SECOND';
    const RPM                   = 'RPM';
    const TERRAHERTZ            = 'TERRAHERTZ';

    /**
     * Calculations for all frequency units
     *
     * @var array
     */
    protected $_units = array(
        'ONE_PER_SECOND'        => array('1',             '1/s'),
        'CYCLE_PER_SECOND'      => array('1',             'cps'),
        'DEGREE_PER_HOUR'       => array(array('' => '1', '/' => '1296000'), '°/h'),
        'DEGREE_PER_MINUTE'     => array(array('' => '1', '/' => '21600'),   '°/m'),
        'DEGREE_PER_SECOND'     => array(array('' => '1', '/' => '360'),     '°/s'),
        'GIGAHERTZ'             => array('1000000000',    'GHz'),
        'HERTZ'                 => array('1',             'Hz'),
        'KILOHERTZ'             => array('1000',          'kHz'),
        'MEGAHERTZ'             => array('1000000',       'MHz'),
        'MILLIHERTZ'            => array('0.001',         'mHz'),
        'RADIAN_PER_HOUR'       => array(array('' => '1', '/' => '22619.467'), 'rad/h'),
        'RADIAN_PER_MINUTE'     => array(array('' => '1', '/' => '376.99112'), 'rad/m'),
        'RADIAN_PER_SECOND'     => array(array('' => '1', '/' => '6.2831853'), 'rad/s'),
        'REVOLUTION_PER_HOUR'   => array(array('' => '1', '/' => '3600'), 'rph'),
        'REVOLUTION_PER_MINUTE' => array(array('' => '1', '/' => '60'),   'rpm'),
        'REVOLUTION_PER_SECOND' => array('1',             'rps'),
        'RPM'                   => array(array('' => '1', '/' => '60'), 'rpm'),
        'TERRAHERTZ'            => array('1000000000000', 'THz'),
        'STANDARD'              =>'HERTZ'
    );
}

repo_name: michael-romer/zf-boilerplate

repo_language: PHP

mime_type: text/html


text:
<?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category  Zend
 * @package   Zend_Measure
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd     New BSD License
 * @version   $Id: Capacitance.php 23775 2011-03-01 17:25:24Z ralph $
 */

/**
 * Implement needed classes
 */
require_once 'Zend/Measure/Abstract.php';
require_once 'Zend/Locale.php';

/**
 * Class for handling capacitance conversions
 *
 * @category   Zend
 * @package    Zend_Measure
 * @subpackage Zend_Measure_Capacitance
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Measure_Capacitance extends Zend_Measure_Abstract
{
    const STANDARD = 'FARAD';

    const ABFARAD                = 'ABFARAD';
    const AMPERE_PER_SECOND_VOLT = 'AMPERE_PER_SECOND_VOLT';
    const CENTIFARAD             = 'CENTIFARAD';
    const COULOMB_PER_VOLT       = 'COULOMB_PER_VOLT';
    const DECIFARAD              = 'DECIFARAD';
    const DEKAFARAD              = 'DEKAFARAD';
    const ELECTROMAGNETIC_UNIT   = 'ELECTROMAGNETIC_UNIT';
    const ELECTROSTATIC_UNIT     = 'ELECTROSTATIC_UNIT';
    const FARAD                  = 'FARAD';
    const FARAD_INTERNATIONAL    = 'FARAD_INTERNATIONAL';
    const GAUSSIAN               = 'GAUSSIAN';
    const GIGAFARAD              = 'GIGAFARAD';
    const HECTOFARAD             = 'HECTOFARAD';
    const JAR                    = 'JAR';
    const KILOFARAD              = 'KILOFARAD';
    const MEGAFARAD              = 'MEGAFARAD';
    const MICROFARAD             = 'MICROFARAD';
    const MILLIFARAD             = 'MILLIFARAD';
    const NANOFARAD              = 'NANOFARAD';
    const PICOFARAD              = 'PICOFARAD';
    const PUFF                   = 'PUFF';
    const SECOND_PER_OHM         = 'SECOND_PER_OHM';
    const STATFARAD              = 'STATFARAD';
    const TERAFARAD              = 'TERAFARAD';

    /**
     * Calculations for all capacitance units
     *
     * @var array
     */
    protected $_units = array(
        'ABFARAD'              => array('1.0e+9',      'abfarad'),
        'AMPERE_PER_SECOND_VOLT' => array('1',         'A/sV'),
        'CENTIFARAD'           => array('0.01',        'cF'),
        'COULOMB_PER_VOLT'     => array('1',           'C/V'),
        'DECIFARAD'            => array('0.1',         'dF'),
        'DEKAFARAD'            => array('10',          'daF'),
        'ELECTROMAGNETIC_UNIT' => array('1.0e+9',      'capacity emu'),
        'ELECTROSTATIC_UNIT'   => array('1.11265e-12', 'capacity esu'),
        'FARAD'                => array('1',           'F'),
        'FARAD_INTERNATIONAL'  => array('0.99951',     'F'),
        'GAUSSIAN'             => array('1.11265e-12', 'G'),
        'GIGAFARAD'            => array('1.0e+9',      'GF'),
        'HECTOFARAD'           => array('100',         'hF'),
        'JAR'                  => array('1.11265e-9',  'jar'),
        'KILOFARAD'            => array('1000',        'kF'),
        'MEGAFARAD'            => array('1000000',     'MF'),
        'MICROFARAD'           => array('0.000001',    'µF'),
        'MILLIFARAD'           => array('0.001',       'mF'),
        'NANOFARAD'            => array('1.0e-9',      'nF'),
        'PICOFARAD'            => array('1.0e-12',     'pF'),
        'PUFF'                 => array('1.0e-12',     'pF'),
        'SECOND_PER_OHM'       => array('1',           's/Ohm'),
        'STATFARAD'            => array('1.11265e-12', 'statfarad'),
        'TERAFARAD'            => array('1.0e+12',     'TF'),
        'STANDARD'             => 'FARAD'
    );
}


text:
<?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category  Zend
 * @package   Zend_Measure
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd     New BSD License
 * @version   $Id: Energy.php 23775 2011-03-01 17:25:24Z ralph $
 */

/**
 * Implement needed classes
 */
require_once 'Zend/Measure/Abstract.php';
require_once 'Zend/Locale.php';

/**
 * Class for handling energy conversions
 *
 * @category   Zend
 * @package    Zend_Measure
 * @subpackage Zend_Measure_Energy
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Measure_Energy extends Zend_Measure_Abstract
{
    const STANDARD = 'JOULE';

    const ATTOJOULE                  = 'ATTOJOULE';
    const BOARD_OF_TRADE_UNIT        = 'BOARD_OF_TRADE_UNIT';
    const BTU                        = 'BTU';
    const BTU_THERMOCHEMICAL         = 'BTU_TERMOCHEMICAL';
    const CALORIE                    = 'CALORIE';
    const CALORIE_15C                = 'CALORIE_15C';
    const CALORIE_NUTRITIONAL        = 'CALORIE_NUTRITIONAL';
    const CALORIE_THERMOCHEMICAL     = 'CALORIE_THERMOCHEMICAL';
    const CELSIUS_HEAT_UNIT          = 'CELSIUS_HEAT_UNIT';
    const CENTIJOULE                 = 'CENTIJOULE';
    const CHEVAL_VAPEUR_HEURE        = 'CHEVAL_VAPEUR_HEURE';
    const DECIJOULE                  = 'DECIJOULE';
    const DEKAJOULE                  = 'DEKAJOULE';
    const DEKAWATT_HOUR              = 'DEKAWATT_HOUR';
    const DEKATHERM                  = 'DEKATHERM';
    const ELECTRONVOLT               = 'ELECTRONVOLT';
    const ERG                        = 'ERG';
    const EXAJOULE                   = 'EXAJOULE';
    const EXAWATT_HOUR               = 'EXAWATT_HOUR';
    const FEMTOJOULE                 = 'FEMTOJOULE';
    const FOOT_POUND                 = 'FOOT_POUND';
    const FOOT_POUNDAL               = 'FOOT_POUNDAL';
    const GALLON_UK_AUTOMOTIVE       = 'GALLON_UK_AUTOMOTIVE';
    const GALLON_US_AUTOMOTIVE       = 'GALLON_US_AUTOMOTIVE';
    const GALLON_UK_AVIATION         = 'GALLON_UK_AVIATION';
    const GALLON_US_AVIATION         = 'GALLON_US_AVIATION';
    const GALLON_UK_DIESEL           = 'GALLON_UK_DIESEL';
    const GALLON_US_DIESEL           = 'GALLON_US_DIESEL';
    const GALLON_UK_DISTILATE        = 'GALLON_UK_DISTILATE';
    const GALLON_US_DISTILATE        = 'GALLON_US_DISTILATE';
    const GALLON_UK_KEROSINE_JET     = 'GALLON_UK_KEROSINE_JET';
    const GALLON_US_KEROSINE_JET     = 'GALLON_US_KEROSINE_JET';
    const GALLON_UK_LPG              = 'GALLON_UK_LPG';
    const GALLON_US_LPG              = 'GALLON_US_LPG';
    const GALLON_UK_NAPHTA           = 'GALLON_UK_NAPHTA';
    const GALLON_US_NAPHTA           = 'GALLON_US_NAPHTA';
    const GALLON_UK_KEROSENE         = 'GALLON_UK_KEROSINE';
    const GALLON_US_KEROSENE         = 'GALLON_US_KEROSINE';
    const GALLON_UK_RESIDUAL         = 'GALLON_UK_RESIDUAL';
    const GALLON_US_RESIDUAL         = 'GALLON_US_RESIDUAL';
    const GIGAELECTRONVOLT           = 'GIGAELECTRONVOLT';
    const GIGACALORIE                = 'GIGACALORIE';
    const GIGACALORIE_15C            = 'GIGACALORIE_15C';
    const GIGAJOULE                  = 'GIGAJOULE';
    const GIGAWATT_HOUR              = 'GIGAWATT_HOUR';
    const GRAM_CALORIE               = 'GRAM_CALORIE';
    const HARTREE                    = 'HARTREE';
    const HECTOJOULE                 = 'HECTOJOULE';
    const HECTOWATT_HOUR             = 'HECTOWATT_HOUR';
    const HORSEPOWER_HOUR            = 'HORSEPOWER_HOUR';
    const HUNDRED_CUBIC_FOOT_GAS     = 'HUNDRED_CUBIC_FOOT_GAS';
    const INCH_OUNCE                 = 'INCH_OUNCE';
    const INCH_POUND                 = 'INCH_POUND';
    const JOULE                      = 'JOULE';
    const KILOCALORIE_15C            = 'KILOCALORIE_15C';
    const KILOCALORIE                = 'KILOCALORIE';
    const KILOCALORIE_THERMOCHEMICAL = 'KILOCALORIE_THERMOCHEMICAL';
    const KILOELECTRONVOLT           = 'KILOELECTRONVOLT';
    const KILOGRAM_CALORIE           = 'KILOGRAM_CALORIE';
    const KILOGRAM_FORCE_METER       = 'KILOGRAM_FORCE_METER';
    const KILOJOULE                  = 'KILOJOULE';
    const KILOPOND_METER             = 'KILOPOND_METER';
    const KILOTON                    = 'KILOTON';
    const KILOWATT_HOUR              = 'KILOWATT_HOUR';
    const LITER_ATMOSPHERE           = 'LITER_ATMOSPHERE';
    const MEGAELECTRONVOLT           = 'MEGAELECTRONVOLT';
    const MEGACALORIE                = 'MEGACALORIE';
    const MEGACALORIE_15C            = 'MEGACALORIE_15C';
    const MEGAJOULE                  = 'MEGAJOULE';
    const MEGALERG                   = 'MEGALERG';
    const MEGATON                    = 'MEGATON';
    const MEGAWATTHOUR               = 'MEGAWATTHOUR';
    const METER_KILOGRAM_FORCE       = 'METER_KILOGRAM_FORCE';
    const MICROJOULE                 = 'MICROJOULE';
    const MILLIJOULE                 = 'MILLIJOULE';
    const MYRIAWATT_HOUR             = 'MYRIAWATT_HOUR';
    const NANOJOULE                  = 'NANOJOULE';
    const NEWTON_METER               = 'NEWTON_METER';
    const PETAJOULE                  = 'PETAJOULE';
    const PETAWATTHOUR               = 'PETAWATTHOUR';
    const PFERDESTAERKENSTUNDE       = 'PFERDESTAERKENSTUNDE';
    const PICOJOULE                  = 'PICOJOULE';
    const Q_UNIT                     = 'Q_UNIT';
    const QUAD                       = 'QUAD';
    const TERAELECTRONVOLT           = 'TERAELECTRONVOLT';
    const TERAJOULE                  = 'TERAJOULE';
    const TERAWATTHOUR               = 'TERAWATTHOUR';
    const THERM                      = 'THERM';
    const THERM_US                   = 'THERM_US';
    const THERMIE                    = 'THERMIE';
    const TON                        = 'TON';
    const TONNE_COAL                 = 'TONNE_COAL';
    const TONNE_OIL                  = 'TONNE_OIL';
    const WATTHOUR                   = 'WATTHOUR';
    const WATTSECOND                 = 'WATTSECOND';
    const YOCTOJOULE                 = 'YOCTOJOULE';
    const YOTTAJOULE                 = 'YOTTAJOULE';
    const YOTTAWATTHOUR              = 'YOTTAWATTHOUR';
    const ZEPTOJOULE                 = 'ZEPTOJOULE';
    const ZETTAJOULE                 = 'ZETTAJOULE';
    const ZETTAWATTHOUR              = 'ZETTAWATTHOUR';

    /**
     * Calculations for all energy units
     *
     * @var array
     */
    protected $_units = array(
        'ATTOJOULE'              => array('1.0e-18',           'aJ'),
        'BOARD_OF_TRADE_UNIT'    => array('3600000',           'BOTU'),
        'BTU'                    => array('1055.0559',         'Btu'),
        'BTU_TERMOCHEMICAL'      => array('1054.3503',         'Btu'),
        'CALORIE'                => array('4.1868',            'cal'),
        'CALORIE_15C'            => array('6.1858',            'cal'),
        'CALORIE_NUTRITIONAL'    => array('4186.8',            'cal'),
        'CALORIE_THERMOCHEMICAL' => array('4.184',             'cal'),
        'CELSIUS_HEAT_UNIT'      => array('1899.1005',         'Chu'),
        'CENTIJOULE'             => array('0.01',              'cJ'),
        'CHEVAL_VAPEUR_HEURE'    => array('2647795.5',         'cv heure'),
        'DECIJOULE'              => array('0.1',               'dJ'),
        'DEKAJOULE'              => array('10',                'daJ'),
        'DEKAWATT_HOUR'          => array('36000',             'daWh'),
        'DEKATHERM'              => array('1.055057e+9',       'dathm'),
        'ELECTRONVOLT'           => array('1.6021773e-19',     'eV'),
        'ERG'                    => array('0.0000001',         'erg'),
        'EXAJOULE'               => array('1.0e+18',           'EJ'),
        'EXAWATT_HOUR'           => array('3.6e+21',           'EWh'),
        'FEMTOJOULE'             => array('1.0e-15',           'fJ'),
        'FOOT_POUND'             => array('1.3558179',         'ft lb'),
        'FOOT_POUNDAL'           => array('0.04214011',        'ft poundal'),
        'GALLON_UK_AUTOMOTIVE'   => array('158237172',         'gal car gasoline'),
        'GALLON_US_AUTOMOTIVE'   => array('131760000',         'gal car gasoline'),
        'GALLON_UK_AVIATION'     => array('158237172',         'gal jet gasoline'),
        'GALLON_US_AVIATION'     => array('131760000',         'gal jet gasoline'),
        'GALLON_UK_DIESEL'       => array('175963194',         'gal diesel'),
        'GALLON_US_DIESEL'       => array('146520000',         'gal diesel'),
        'GALLON_UK_DISTILATE'    => array('175963194',         'gal destilate fuel'),
        'GALLON_US_DISTILATE'    => array('146520000',         'gal destilate fuel'),
        'GALLON_UK_KEROSINE_JET' => array('170775090',         'gal jet kerosine'),
        'GALLON_US_KEROSINE_JET' => array('142200000',         'gal jet kerosine'),
        'GALLON_UK_LPG'          => array('121005126.0865275', 'gal lpg'),
        'GALLON_US_LPG'          => array('100757838.45',      'gal lpg'),
        'GALLON_UK_NAPHTA'       => array('160831224',         'gal jet fuel'),
        'GALLON_US_NAPHTA'       => array('133920000',         'gal jet fuel'),
        'GALLON_UK_KEROSINE'     => array('170775090',         'gal kerosine'),
        'GALLON_US_KEROSINE'     => array('142200000',         'gal kerosine'),
        'GALLON_UK_RESIDUAL'     => array('189798138',         'gal residual fuel'),
        'GALLON_US_RESIDUAL'     => array('158040000',         'gal residual fuel'),
        'GIGAELECTRONVOLT'       => array('1.6021773e-10',     'GeV'),
        'GIGACALORIE'            => array('4186800000',        'Gcal'),
        'GIGACALORIE_15C'        => array('4185800000',        'Gcal'),
        'GIGAJOULE'              => array('1.0e+9',            'GJ'),
        'GIGAWATT_HOUR'          => array('3.6e+12',           'GWh'),
        'GRAM_CALORIE'           => array('4.1858',            'g cal'),
        'HARTREE'                => array('4.3597482e-18',     'Eh'),
        'HECTOJOULE'             => array('100',               'hJ'),
        'HECTOWATT_HOUR'         => array('360000',            'hWh'),
        'HORSEPOWER_HOUR'        => array('2684519.5',         'hph'),
        'HUNDRED_CUBIC_FOOT_GAS' => array('108720000',         'hundred ft� gas'),
        'INCH_OUNCE'             => array('0.0070615518',      'in oc'),
        'INCH_POUND'             => array('0.112984825',       'in lb'),
        'JOULE'                  => array('1',                 'J'),
        'KILOCALORIE_15C'        => array('4185.8',            'kcal'),
        'KILOCALORIE'            => array('4186','8',          'kcal'),
        'KILOCALORIE_THERMOCHEMICAL' => array('4184',          'kcal'),
        'KILOELECTRONVOLT'       => array('1.6021773e-16',     'keV'),
        'KILOGRAM_CALORIE'       => array('4185.8',            'kg cal'),
        'KILOGRAM_FORCE_METER'   => array('9.80665',           'kgf m'),
        'KILOJOULE'              => array('1000',              'kJ'),
        'KILOPOND_METER'         => array('9.80665',           'kp m'),
        'KILOTON'                => array('4.184e+12',         'kt'),
        'KILOWATT_HOUR'          => array('3600000',           'kWh'),
        'LITER_ATMOSPHERE'       => array('101.325',           'l atm'),
        'MEGAELECTRONVOLT'       => array('1.6021773e-13',     'MeV'),
        'MEGACALORIE'            => array('4186800',           'Mcal'),
        'MEGACALORIE_15C'        => array('4185800',           'Mcal'),
        'MEGAJOULE'              => array('1000000',           'MJ'),
        'MEGALERG'               => array('0.1',               'megalerg'),
        'MEGATON'                => array('4.184e+15',         'Mt'),
        'MEGAWATTHOUR'           => array('3.6e+9',            'MWh'),
        'METER_KILOGRAM_FORCE'   => array('9.80665',           'm kgf'),
        'MICROJOULE'             => array('0.000001',          '�J'),
        'MILLIJOULE'             => array('0.001',             'mJ'),
        'MYRIAWATT_HOUR'         => array('3.6e+7',            'myWh'),
        'NANOJOULE'              => array('1.0e-9',            'nJ'),
        'NEWTON_METER'           => array('1',                 'Nm'),
        'PETAJOULE'              => array('1.0e+15',           'PJ'),
        'PETAWATTHOUR'           => array('3.6e+18',           'PWh'),
        'PFERDESTAERKENSTUNDE'   => array('2647795.5',         'ps h'),
        'PICOJOULE'              => array('1.0e-12',           'pJ'),
        'Q_UNIT'                 => array('1.0550559e+21',     'Q unit'),
        'QUAD'                   => array('1.0550559e+18',     'quad'),
        'TERAELECTRONVOLT'       => array('1.6021773e-7',      'TeV'),
        'TERAJOULE'              => array('1.0e+12',           'TJ'),
        'TERAWATTHOUR'           => array('3.6e+15',           'TWh'),
        'THERM'                  => array('1.0550559e+8',      'thm'),
        'THERM_US'               => array('1.054804e+8',       'thm'),
        'THERMIE'                => array('4185800',           'th'),
        'TON'                    => array('4.184e+9',          'T explosive'),
        'TONNE_COAL'             => array('2.93076e+10',       'T coal'),
        'TONNE_OIL'              => array('4.1868e+10',        'T oil'),
        'WATTHOUR'               => array('3600',              'Wh'),
        'WATTSECOND'             => array('1',                 'Ws'),
        'YOCTOJOULE'             => array('1.0e-24',           'yJ'),
        'YOTTAJOULE'             => array('1.0e+24',           'YJ'),
        'YOTTAWATTHOUR'          => array('3.6e+27',           'YWh'),
        'ZEPTOJOULE'             => array('1.0e-21',           'zJ'),
        'ZETTAJOULE'             => array('1.0e+21',           'ZJ'),
        'ZETTAWATTHOUR'          => array('3.6e+24',           'ZWh'),
        'STANDARD'               => 'JOULE'
    );
}


text:
<?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category  Zend
 * @package   Zend_Measure
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd     New BSD License
 * @version   $Id: Lightness.php 23775 2011-03-01 17:25:24Z ralph $
 */

/**
 * Implement needed classes
 */
require_once 'Zend/Measure/Abstract.php';
require_once 'Zend/Locale.php';

/**
 * Class for handling temperature conversions
 *
 * @category   Zend
 * @package    Zend_Measure
 * @subpackage Zend_Measure_Lightness
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Measure_Lightness extends Zend_Measure_Abstract
{
    const STANDARD = 'CANDELA_PER_SQUARE_METER';

    const APOSTILB                          = 'APOSTILB';
    const BLONDEL                           = 'BLONDEL';
    const CANDELA_PER_SQUARE_CENTIMETER     = 'CANDELA_PER_SQUARE_CENTIMETER';
    const CANDELA_PER_SQUARE_FOOT           = 'CANDELA_PER_SQUARE_FOOT';
    const CANDELA_PER_SQUARE_INCH           = 'CANDELA_PER_SQUARE_INCH';
    const CANDELA_PER_SQUARE_METER          = 'CANDELA_PER_SQUARE_METER';
    const FOOTLAMBERT                       = 'FOOTLAMBERT';
    const KILOCANDELA_PER_SQUARE_CENTIMETER = 'KILOCANDELA_PER_SQUARE_CENTIMETER';
    const KILOCANDELA_PER_SQUARE_FOOT       = 'KILOCANDELA_PER_SQUARE_FOOT';
    const KILOCANDELA_PER_SQUARE_INCH       = 'KILOCANDELA_PER_SQUARE_INCH';
    const KILOCANDELA_PER_SQUARE_METER      = 'KILOCANDELA_PER_SQUARE_METER';
    const LAMBERT                           = 'LAMBERT';
    const MILLILAMBERT                      = 'MILLILAMBERT';
    const NIT                               = 'NIT';
    const STILB                             = 'STILB';

    /**
     * Calculations for all lightness units
     *
     * @var array
     */
    protected $_units = array(
        'APOSTILB'                      => array('0.31830989',   'asb'),
        'BLONDEL'                       => array('0.31830989',   'blondel'),
        'CANDELA_PER_SQUARE_CENTIMETER' => array('10000',        'cd/cm²'),
        'CANDELA_PER_SQUARE_FOOT'       => array('10.76391',     'cd/ft²'),
        'CANDELA_PER_SQUARE_INCH'       => array('1550.00304',   'cd/in²'),
        'CANDELA_PER_SQUARE_METER'      => array('1',            'cd/m²'),
        'FOOTLAMBERT'                   => array('3.4262591',    'ftL'),
        'KILOCANDELA_PER_SQUARE_CENTIMETER' => array('10000000', 'kcd/cm²'),
        'KILOCANDELA_PER_SQUARE_FOOT'   => array('10763.91',     'kcd/ft²'),
        'KILOCANDELA_PER_SQUARE_INCH'   => array('1550003.04',   'kcd/in²'),
        'KILOCANDELA_PER_SQUARE_METER'  => array('1000',         'kcd/m²'),
        'LAMBERT'                       => array('3183.0989',    'L'),
        'MILLILAMBERT'                  => array('3.1830989',    'mL'),
        'NIT'                           => array('1',            'nt'),
        'STILB'                         => array('10000',        'sb'),
        'STANDARD'                      => 'CANDELA_PER_SQUARE_METER'
    );
}


text:
<?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category  Zend
 * @package   Zend_Measure
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd     New BSD License
 * @version   $Id: Abstract.php 23775 2011-03-01 17:25:24Z ralph $
 */

/**
 * @see Zend_Locale
 */
require_once 'Zend/Locale.php';

/**
 * @see Zend_Locale_Math
 */
require_once 'Zend/Locale/Math.php';

/**
 * @see Zend_Locale_Format
 */
require_once 'Zend/Locale/Format.php';

/**
 * Abstract class for all measurements
 *
 * @category   Zend
 * @package    Zend_Measure
 * @subpackage Zend_Measure_Abstract
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
abstract class Zend_Measure_Abstract
{
    /**
     * Plain value in standard unit
     *
     * @var string $_value
     */
    protected $_value;

    /**
     * Original type for this unit
     *
     * @var string $_type
     */
    protected $_type;

    /**
     * Locale identifier
     *
     * @var string $_locale
     */
    protected $_locale = null;

    /**
     * Unit types for this measurement
     */
    protected $_units = array();

    /**
     * Zend_Measure_Abstract is an abstract class for the different measurement types
     *
     * @param  mixed       $value  Value as string, integer, real or float
     * @param  int         $type   OPTIONAL a measure type f.e. Zend_Measure_Length::METER
     * @param  Zend_Locale $locale OPTIONAL a Zend_Locale Type
     * @throws Zend_Measure_Exception
     */
    public function __construct($value, $type = null, $locale = null)
    {
        if (($type !== null) and (Zend_Locale::isLocale($type, null, false))) {
            $locale = $type;
            $type = null;
        }

        $this->setLocale($locale);
        if ($type === null) {
            $type = $this->_units['STANDARD'];
        }

        if (isset($this->_units[$type]) === false) {
            require_once 'Zend/Measure/Exception.php';
            throw new Zend_Measure_Exception("Type ($type) is unknown");
        }

        $this->setValue($value, $type, $this->_locale);
    }

    /**
     * Returns the actual set locale
     *
     * @return string
     */
    public function getLocale()
    {
        return $this->_locale;
    }

    /**
     * Sets a new locale for the value representation
     *
     * @param string|Zend_Locale $locale (Optional) New locale to set
     * @param boolean            $check  False, check but don't set; True, set the new locale
     * @return Zend_Measure_Abstract
     */
    public function setLocale($locale = null, $check = false)
    {
        if (empty($locale)) {
            require_once 'Zend/Registry.php';
            if (Zend_Registry::isRegistered('Zend_Locale') === true) {
                $locale = Zend_Registry::get('Zend_Locale');
            }
        }

        if ($locale === null) {
            $locale = new Zend_Locale();
        }

        if (!Zend_Locale::isLocale($locale, true, false)) {
            if (!Zend_Locale::isLocale($locale, false, false)) {
                require_once 'Zend/Measure/Exception.php';
                throw new Zend_Measure_Exception("Language (" . (string) $locale . ") is unknown");
            }

            $locale = new Zend_Locale($locale);
        }

        if (!$check) {
            $this->_locale = (string) $locale;
        }
        return $this;
    }

    /**
     * Returns the internal value
     *
     * @param integer            $round  (Optional) Rounds the value to an given precision,
     *                                              Default is -1 which returns without rounding
     * @param string|Zend_Locale $locale (Optional) Locale for number representation
     * @return integer|string
     */
    public function getValue($round = -1, $locale = null)
    {
        if ($round < 0) {
            $return = $this->_value;
        } else {
            $return = Zend_Locale_Math::round($this->_value, $round);
        }

        if ($locale !== null) {
            $this->setLocale($locale, true);
            return Zend_Locale_Format::toNumber($return, array('locale' => $locale));
        }

        return $return;
    }

    /**
     * Set a new value
     *
     * @param  integer|string      $value   Value as string, integer, real or float
     * @param  string              $type    OPTIONAL A measure type f.e. Zend_Measure_Length::METER
     * @param  string|Zend_Locale  $locale  OPTIONAL Locale for parsing numbers
     * @throws Zend_Measure_Exception
     * @return Zend_Measure_Abstract
     */
    public function setValue($value, $type = null, $locale = null)
    {
        if (($type !== null) and (Zend_Locale::isLocale($type, null, false))) {
            $locale = $type;
            $type = null;
        }

        if ($locale === null) {
            $locale = $this->_locale;
        }

        $this->setLocale($locale, true);
        if ($type === null) {
            $type = $this->_units['STANDARD'];
        }

        if (empty($this->_units[$type])) {
            require_once 'Zend/Measure/Exception.php';
            throw new Zend_Measure_Exception("Type ($type) is unknown");
        }

        try {
            $value = Zend_Locale_Format::getNumber($value, array('locale' => $locale));
        } catch(Exception $e) {
            require_once 'Zend/Measure/Exception.php';
            throw new Zend_Measure_Exception($e->getMessage(), $e->getCode(), $e);
        }

        $this->_value = $value;
        $this->setType($type);
        return $this;
    }

    /**
     * Returns the original type
     *
     * @return type
     */
    public function getType()
    {
        return $this->_type;
    }

    /**
     * Set a new type, and convert the value
     *
     * @param  string $type New type to set
     * @throws Zend_Measure_Exception
     * @return Zend_Measure_Abstract
     */
    public function setType($type)
    {
        if (empty($this->_units[$type])) {
            require_once 'Zend/Measure/Exception.php';
            throw new Zend_Measure_Exception("Type ($type) is unknown");
        }

        if (empty($this->_type)) {
            $this->_type = $type;
        } else {
            // Convert to standard value
            $value = $this->_value;
            if (is_array($this->_units[$this->getType()][0])) {
                foreach ($this->_units[$this->getType()][0] as $key => $found) {
                    switch ($key) {
                        case "/":
                            if ($found != 0) {
                                $value = call_user_func(Zend_Locale_Math::$div, $value, $found, 25);
                            }
                            break;
                        case "+":
                            $value = call_user_func(Zend_Locale_Math::$add, $value, $found, 25);
                            break;
                        case "-":
                            $value = call_user_func(Zend_Locale_Math::$sub, $value, $found, 25);
                            break;
                        default:
                            $value = call_user_func(Zend_Locale_Math::$mul, $value, $found, 25);
                            break;
                    }
                }
            } else {
                $value = call_user_func(Zend_Locale_Math::$mul, $value, $this->_units[$this->getType()][0], 25);
            }

            // Convert to expected value
            if (is_array($this->_units[$type][0])) {
                foreach (array_reverse($this->_units[$type][0]) as $key => $found) {
                    switch ($key) {
                        case "/":
                            $value = call_user_func(Zend_Locale_Math::$mul, $value, $found, 25);
                            break;
                        case "+":
                            $value = call_user_func(Zend_Locale_Math::$sub, $value, $found, 25);
                            break;
                        case "-":
                            $value = call_user_func(Zend_Locale_Math::$add, $value, $found, 25);
                            break;
                        default:
                            if ($found != 0) {
                                $value = call_user_func(Zend_Locale_Math::$div, $value, $found, 25);
                            }
                            break;
                    }
                }
            } else {
                $value = call_user_func(Zend_Locale_Math::$div, $value, $this->_units[$type][0], 25);
            }

            $slength = strlen($value);
            $length  = 0;
            for($i = 1; $i <= $slength; ++$i) {
                if ($value[$slength - $i] != '0') {
                    $length = 26 - $i;
                    break;
                }
            }

            $this->_value = Zend_Locale_Math::round($value, $length);
            $this->_type  = $type;
        }
        return $this;
    }

    /**
     * Compare if the value and type is equal
     *
     * @param  Zend_Measure_Abstract $object object to compare
     * @return boolean
     */
    public function equals($object)
    {
        if ((string) $object == $this->toString()) {
            return true;
        }

        return false;
    }

    /**
     * Returns a string representation
     *
     * @param  integer            $round  (Optional) Runds the value to an given exception
     * @param  string|Zend_Locale $locale (Optional) Locale to set for the number
     * @return string
     */
    public function toString($round = -1, $locale = null)
    {
        if ($locale === null) {
            $locale = $this->_locale;
        }

        return $this->getValue($round, $locale) . ' ' . $this->_units[$this->getType()][1];
    }

    /**
     * Returns a string representation
     *
     * @return string
     */
    public function __toString()
    {
        return $this->toString();
    }

    /**
     * Returns the conversion list
     *
     * @return array
     */
    public function getConversionList()
    {
        return $this->_units;
    }

    /**
     * Alias function for setType returning the converted unit
     *
     * @param  string             $type   Constant Type
     * @param  integer            $round  (Optional) Rounds the value to a given precision
     * @param  string|Zend_Locale $locale (Optional) Locale to set for the number
     * @return string
     */
    public function convertTo($type, $round = 2, $locale = null)
    {
        $this->setType($type);
        return $this->toString($round, $locale);
    }

    /**
     * Adds an unit to another one
     *
     * @param  Zend_Measure_Abstract $object object of same unit type
     * @return Zend_Measure_Abstract
     */
    public function add($object)
    {
        $object->setType($this->getType());
        $value  = $this->getValue(-1) + $object->getValue(-1);

        $this->setValue($value, $this->getType(), $this->_locale);
        return $this;
    }

    /**
     * Substracts an unit from another one
     *
     * @param  Zend_Measure_Abstract $object object of same unit type
     * @return Zend_Measure_Abstract
     */
    public function sub($object)
    {
        $object->setType($this->getType());
        $value  = $this->getValue(-1) - $object->getValue(-1);

        $this->setValue($value, $this->getType(), $this->_locale);
        return $this;
    }

    /**
     * Compares two units
     *
     * @param  Zend_Measure_Abstract $object object of same unit type
     * @return boolean
     */
    public function compare($object)
    {
        $object->setType($this->getType());
        $value  = $this->getValue(-1) - $object->getValue(-1);

        if ($value < 0) {
            return -1;
        } else if ($value > 0) {
            return 1;
        }

        return 0;
    }
}


text:
<?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category  Zend
 * @package   Zend_Measure
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd     New BSD License
 * @version   $Id: Current.php 23775 2011-03-01 17:25:24Z ralph $
 */

/**
 * Implement needed classes
 */
require_once 'Zend/Measure/Abstract.php';
require_once 'Zend/Locale.php';

/**
 * Class for handling current conversions
 *
 * @category   Zend
 * @package    Zend_Measure
 * @subpackage Zend_Measure_Current
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Measure_Current extends Zend_Measure_Abstract
{
    const STANDARD = 'AMPERE';

    const ABAMPERE             = 'ABAMPERE';
    const AMPERE               = 'AMPERE';
    const BIOT                 = 'BIOT';
    const CENTIAMPERE          = 'CENTIAMPERE';
    const COULOMB_PER_SECOND   = 'COULOMB_PER_SECOND';
    const DECIAMPERE           = 'DECIAMPERE';
    const DEKAAMPERE           = 'DEKAAMPERE';
    const ELECTROMAGNETIC_UNIT = 'ELECTROMAGNATIC_UNIT';
    const ELECTROSTATIC_UNIT   = 'ELECTROSTATIC_UNIT';
    const FRANCLIN_PER_SECOND  = 'FRANCLIN_PER_SECOND';
    const GAUSSIAN             = 'GAUSSIAN';
    const GIGAAMPERE           = 'GIGAAMPERE';
    const GILBERT              = 'GILBERT';
    const HECTOAMPERE          = 'HECTOAMPERE';
    const KILOAMPERE           = 'KILOAMPERE';
    const MEGAAMPERE           = 'MEGAAMPERE';
    const MICROAMPERE          = 'MICROAMPERE';
    const MILLIAMPERE          = 'MILLIAMPERE';
    const NANOAMPERE           = 'NANOAMPERE';
    const PICOAMPERE           = 'PICOAMPERE';
    const SIEMENS_VOLT         = 'SIEMENS_VOLT';
    const STATAMPERE           = 'STATAMPERE';
    const TERAAMPERE           = 'TERAAMPERE';
    const VOLT_PER_OHM         = 'VOLT_PER_OHM';
    const WATT_PER_VOLT        = 'WATT_PER_VOLT';
    const WEBER_PER_HENRY      = 'WEBER_PER_HENRY';

    /**
     * Calculations for all current units
     *
     * @var array
     */
    protected $_units = array(
        'ABAMPERE'             => array('10',           'abampere'),
        'AMPERE'               => array('1',            'A'),
        'BIOT'                 => array('10',           'Bi'),
        'CENTIAMPERE'          => array('0.01',         'cA'),
        'COULOMB_PER_SECOND'   => array('1',            'C/s'),
        'DECIAMPERE'           => array('0.1',          'dA'),
        'DEKAAMPERE'           => array('10',           'daA'),
        'ELECTROMAGNATIC_UNIT' => array('10',           'current emu'),
        'ELECTROSTATIC_UNIT'   => array('3.335641e-10', 'current esu'),
        'FRANCLIN_PER_SECOND'  => array('3.335641e-10', 'Fr/s'),
        'GAUSSIAN'             => array('3.335641e-10', 'G current'),
        'GIGAAMPERE'           => array('1.0e+9',       'GA'),
        'GILBERT'              => array('0.79577472',   'Gi'),
        'HECTOAMPERE'          => array('100',          'hA'),
        'KILOAMPERE'           => array('1000',         'kA'),
        'MEGAAMPERE'           => array('1000000',      'MA') ,
        'MICROAMPERE'          => array('0.000001',     'µA'),
        'MILLIAMPERE'          => array('0.001',        'mA'),
        'NANOAMPERE'           => array('1.0e-9',       'nA'),
        'PICOAMPERE'           => array('1.0e-12',      'pA'),
        'SIEMENS_VOLT'         => array('1',            'SV'),
        'STATAMPERE'           => array('3.335641e-10', 'statampere'),
        'TERAAMPERE'           => array('1.0e+12',      'TA'),
        'VOLT_PER_OHM'         => array('1',            'V/Ohm'),
        'WATT_PER_VOLT'        => array('1',            'W/V'),
        'WEBER_PER_HENRY'      => array('1',            'Wb/H'),
        'STANDARD'             => 'AMPERE'
    );
}


text:
<?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category  Zend
 * @package   Zend_Measure
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd     New BSD License
 * @version   $Id: Force.php 23775 2011-03-01 17:25:24Z ralph $
 */

/**
 * Implement needed classes
 */
require_once 'Zend/Measure/Abstract.php';
require_once 'Zend/Locale.php';

/**
 * Class for handling force conversions
 *
 * @category   Zend
 * @package    Zend_Measure
 * @subpackage Zend_Measure_Force
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Measure_Force extends Zend_Measure_Abstract
{
    const STANDARD = 'NEWTON';

    const ATTONEWTON      = 'ATTONEWTON';
    const CENTINEWTON     = 'CENTINEWTON';
    const DECIGRAM_FORCE  = 'DECIGRAM_FORCE';
    const DECINEWTON      = 'DECINEWTON';
    const DEKAGRAM_FORCE  = 'DEKAGRAM_FORCE';
    const DEKANEWTON      = 'DEKANEWTON';
    const DYNE            = 'DYNE';
    const EXANEWTON       = 'EXANEWTON';
    const FEMTONEWTON     = 'FEMTONEWTON';
    const GIGANEWTON      = 'GIGANEWTON';
    const GRAM_FORCE      = 'GRAM_FORCE';
    const HECTONEWTON     = 'HECTONEWTON';
    const JOULE_PER_METER = 'JOULE_PER_METER';
    const KILOGRAM_FORCE  = 'KILOGRAM_FORCE';
    const KILONEWTON      = 'KILONEWTON';
    const KILOPOND        = 'KILOPOND';
    const KIP             = 'KIP';
    const MEGANEWTON      = 'MEGANEWTON';
    const MEGAPOND        = 'MEGAPOND';
    const MICRONEWTON     = 'MICRONEWTON';
    const MILLINEWTON     = 'MILLINEWTON';
    const NANONEWTON      = 'NANONEWTON';
    const NEWTON          = 'NEWTON';
    const OUNCE_FORCE     = 'OUNCE_FORCE';
    const PETANEWTON      = 'PETANEWTON';
    const PICONEWTON      = 'PICONEWTON';
    const POND            = 'POND';
    const POUND_FORCE     = 'POUND_FORCE';
    const POUNDAL         = 'POUNDAL';
    const STHENE          = 'STHENE';
    const TERANEWTON      = 'TERANEWTON';
    const TON_FORCE_LONG  = 'TON_FORCE_LONG';
    const TON_FORCE       = 'TON_FORCE';
    const TON_FORCE_SHORT = 'TON_FORCE_SHORT';
    const YOCTONEWTON     = 'YOCTONEWTON';
    const YOTTANEWTON     = 'YOTTANEWTON';
    const ZEPTONEWTON     = 'ZEPTONEWTON';
    const ZETTANEWTON     = 'ZETTANEWTON';

    /**
     * Calculations for all force units
     *
     * @var array
     */
    protected $_units = array(
        'ATTONEWTON'      => array('1.0e-18',     'aN'),
        'CENTINEWTON'     => array('0.01',        'cN'),
        'DECIGRAM_FORCE'  => array('0.000980665', 'dgf'),
        'DECINEWTON'      => array('0.1',         'dN'),
        'DEKAGRAM_FORCE'  => array('0.0980665',   'dagf'),
        'DEKANEWTON'      => array('10',          'daN'),
        'DYNE'            => array('0.00001',     'dyn'),
        'EXANEWTON'       => array('1.0e+18',     'EN'),
        'FEMTONEWTON'     => array('1.0e-15',     'fN'),
        'GIGANEWTON'      => array('1.0e+9',      'GN'),
        'GRAM_FORCE'      => array('0.00980665',  'gf'),
        'HECTONEWTON'     => array('100',         'hN'),
        'JOULE_PER_METER' => array('1',           'J/m'),
        'KILOGRAM_FORCE'  => array('9.80665',     'kgf'),
        'KILONEWTON'      => array('1000',        'kN'),
        'KILOPOND'        => array('9.80665',     'kp'),
        'KIP'             => array('4448.2216',   'kip'),
        'MEGANEWTON'      => array('1000000',     'Mp'),
        'MEGAPOND'        => array('9806.65',     'MN'),
        'MICRONEWTON'     => array('0.000001',    'µN'),
        'MILLINEWTON'     => array('0.001',       'mN'),
        'NANONEWTON'      => array('0.000000001', 'nN'),
        'NEWTON'          => array('1',           'N'),
        'OUNCE_FORCE'     => array('0.27801385',  'ozf'),
        'PETANEWTON'      => array('1.0e+15',     'PN'),
        'PICONEWTON'      => array('1.0e-12',     'pN'),
        'POND'            => array('0.00980665',  'pond'),
        'POUND_FORCE'     => array('4.4482216',   'lbf'),
        'POUNDAL'         => array('0.13825495',  'pdl'),
        'STHENE'          => array('1000',        'sn'),
        'TERANEWTON'      => array('1.0e+12',     'TN'),
        'TON_FORCE_LONG'  => array('9964.016384', 'tnf'),
        'TON_FORCE'       => array('9806.65',     'tnf'),
        'TON_FORCE_SHORT' => array('8896.4432',   'tnf'),
        'YOCTONEWTON'     => array('1.0e-24',     'yN'),
        'YOTTANEWTON'     => array('1.0e+24',     'YN'),
        'ZEPTONEWTON'     => array('1.0e-21',     'zN'),
        'ZETTANEWTON'     => array('1.0e+21',     'ZN'),
        'STANDARD'        => 'NEWTON'
    );
}


text:
<?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category  Zend
 * @package   Zend_Measure
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd     New BSD License
 * @version   $Id: Temperature.php 23775 2011-03-01 17:25:24Z ralph $
 */

/**
 * Implement needed classes
 */
require_once 'Zend/Measure/Abstract.php';
require_once 'Zend/Locale.php';

/**
 * Class for handling temperature conversions
 *
 * @category   Zend
 * @package    Zend_Measure
 * @subpackage Zend_Measure_Temperature
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Measure_Temperature extends Zend_Measure_Abstract
{
    const STANDARD = 'KELVIN';

    const CELSIUS    = 'CELSIUS';
    const FAHRENHEIT = 'FAHRENHEIT';
    const RANKINE    = 'RANKINE';
    const REAUMUR    = 'REAUMUR';
    const KELVIN     = 'KELVIN';

    /**
     * Calculations for all temperature units
     *
     * @var array
     */
    protected $_units = array(
        'CELSIUS'    => array(array('' => '1', '+' => '273.15'),'°C'),
        'FAHRENHEIT' => array(array('' => '1', '-' => '32', '/' => '1.8', '+' => '273.15'),'°F'),
        'RANKINE'    => array(array('' => '1', '/' => '1.8'),'°R'),
        'REAUMUR'    => array(array('' => '1', '*' => '1.25', '+' => '273.15'),'°r'),
        'KELVIN'     => array(1,'°K'),
        'STANDARD'   => 'KELVIN'
    );
}


text:
<?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category  Zend
 * @package   Zend_Measure
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd     New BSD License
 * @version   $Id: Acceleration.php 23775 2011-03-01 17:25:24Z ralph $
 */

/**
 * Implement needed classes
 */
require_once 'Zend/Measure/Abstract.php';
require_once 'Zend/Locale.php';

/**
 * Class for handling acceleration conversions
 *
 * @category   Zend
 * @package    Zend_Measure
 * @subpackage Zend_Measure_Acceleration
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Measure_Acceleration extends Zend_Measure_Abstract
{
    const STANDARD = 'METER_PER_SQUARE_SECOND';

    const CENTIGAL                     = 'CENTIGAL';
    const CENTIMETER_PER_SQUARE_SECOND = 'CENTIMETER_PER_SQUARE_SECOND';
    const DECIGAL                      = 'DECIGAL';
    const DECIMETER_PER_SQUARE_SECOND  = 'DECIMETER_PER_SQUARE_SECOND';
    const DEKAMETER_PER_SQUARE_SECOND  = 'DEKAMETER_PER_SQUARE_SECOND';
    const FOOT_PER_SQUARE_SECOND       = 'FOOT_PER_SQUARE_SECOND';
    const G                            = 'G';
    const GAL                          = 'GAL';
    const GALILEO                      = 'GALILEO';
    const GRAV                         = 'GRAV';
    const HECTOMETER_PER_SQUARE_SECOND = 'HECTOMETER_PER_SQUARE_SECOND';
    const INCH_PER_SQUARE_SECOND       = 'INCH_PER_SQUARE_SECOND';
    const KILOMETER_PER_HOUR_SECOND    = 'KILOMETER_PER_HOUR_SECOND';
    const KILOMETER_PER_SQUARE_SECOND  = 'KILOMETER_PER_SQUARE_SECOND';
    const METER_PER_SQUARE_SECOND      = 'METER_PER_SQUARE_SECOND';
    const MILE_PER_HOUR_MINUTE         = 'MILE_PER_HOUR_MINUTE';
    const MILE_PER_HOUR_SECOND         = 'MILE_PER_HOUR_SECOND';
    const MILE_PER_SQUARE_SECOND       = 'MILE_PER_SQUARE_SECOND';
    const MILLIGAL                     = 'MILLIGAL';
    const MILLIMETER_PER_SQUARE_SECOND = 'MILLIMETER_PER_SQUARE_SECOND';

    /**
     * Calculations for all acceleration units
     *
     * @var array
     */
    protected $_units = array(
        'CENTIGAL'                     => array('0.0001',   'cgal'),
        'CENTIMETER_PER_SQUARE_SECOND' => array('0.01',     'cm/s²'),
        'DECIGAL'                      => array('0.001',    'dgal'),
        'DECIMETER_PER_SQUARE_SECOND'  => array('0.1',      'dm/s²'),
        'DEKAMETER_PER_SQUARE_SECOND'  => array('10',       'dam/s²'),
        'FOOT_PER_SQUARE_SECOND'       => array('0.3048',   'ft/s²'),
        'G'                            => array('9.80665',  'g'),
        'GAL'                          => array('0.01',     'gal'),
        'GALILEO'                      => array('0.01',     'gal'),
        'GRAV'                         => array('9.80665',  'g'),
        'HECTOMETER_PER_SQUARE_SECOND' => array('100',      'h/s²'),
        'INCH_PER_SQUARE_SECOND'       => array('0.0254',   'in/s²'),
        'KILOMETER_PER_HOUR_SECOND'    => array(array('' => '5','/' => '18'), 'km/h²'),
        'KILOMETER_PER_SQUARE_SECOND'  => array('1000',     'km/s²'),
        'METER_PER_SQUARE_SECOND'      => array('1',        'm/s²'),
        'MILE_PER_HOUR_MINUTE'         => array(array('' => '22', '/' => '15', '*' => '0.3048', '/' => '60'), 'mph/m'),
        'MILE_PER_HOUR_SECOND'         => array(array('' => '22', '/' => '15', '*' => '0.3048'), 'mph/s'),
        'MILE_PER_SQUARE_SECOND'       => array('1609.344', 'mi/s²'),
        'MILLIGAL'                     => array('0.00001',  'mgal'),
        'MILLIMETER_PER_SQUARE_SECOND' => array('0.001',    'mm/s²'),
        'STANDARD'                     => 'METER_PER_SQUARE_SECOND'
    );
}


text:
<?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category  Zend
 * @package   Zend_Measure
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd     New BSD License
 * @version   $Id: Time.php 23775 2011-03-01 17:25:24Z ralph $
 */

/**
 * Implement needed classes
 */
require_once 'Zend/Measure/Abstract.php';
require_once 'Zend/Locale.php';

/**
 * Class for handling time conversions
 *
 * @category   Zend
 * @package    Zend_Measure
 * @subpackage Zend_Measure_Time
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Measure_Time extends Zend_Measure_Abstract
{
    const STANDARD = 'SECOND';

    const ANOMALISTIC_YEAR  = 'ANOMALISTIC_YEAR';
    const ATTOSECOND        = 'ATTOSECOND';
    const CENTURY           = 'CENTURY';
    const DAY               = 'DAY';
    const DECADE            = 'DECADE';
    const DRACONIC_YEAR     = 'DRACONTIC_YEAR';
    const EXASECOND         = 'EXASECOND';
    const FEMTOSECOND       = 'FEMTOSECOND';
    const FORTNIGHT         = 'FORTNIGHT';
    const GAUSSIAN_YEAR     = 'GAUSSIAN_YEAR';
    const GIGASECOND        = 'GIGASECOND';
    const GREGORIAN_YEAR    = 'GREGORIAN_YEAR';
    const HOUR              = 'HOUR';
    const JULIAN_YEAR       = 'JULIAN_YEAR';
    const KILOSECOND        = 'KILOSECOND';
    const LEAPYEAR          = 'LEAPYEAR';
    const MEGASECOND        = 'MEGASECOND';
    const MICROSECOND       = 'MICROSECOND';
    const MILLENIUM         = 'MILLENIUM';
    const MILLISECOND       = 'MILLISECOND';
    const MINUTE            = 'MINUTE';
    const MONTH             = 'MONTH';
    const NANOSECOND        = 'NANOSECOND';
    const PETASECOND        = 'PETASECOND';
    const PICOSECOND        = 'PICOSECOND';
    const QUARTER           = 'QUARTER';
    const SECOND            = 'SECOND';
    const SHAKE             = 'SHAKE';
    const SIDEREAL_YEAR     = 'SYNODIC_MONTH';
    const TERASECOND        = 'TERASECOND';
    const TROPICAL_YEAR     = 'TROPIC_YEAR';
    const WEEK              = 'WEEK';
    const YEAR              = 'YEAR';

    /**
     * Calculations for all time units
     *
     * @var array
     */
    protected $_units = array(
        'ANOMALISTIC_YEAR'  => array('31558432', 'anomalistic year'),
        'ATTOSECOND'        => array('1.0e-18', 'as'),
        'CENTURY'           => array('3153600000', 'century'),
        'DAY'               => array('86400', 'day'),
        'DECADE'            => array('315360000', 'decade'),
        'DRACONIC_YEAR'     => array('29947974', 'draconic year'),
        'EXASECOND'         => array('1.0e+18', 'Es'),
        'FEMTOSECOND'       => array('1.0e-15', 'fs'),
        'FORTNIGHT'         => array('1209600', 'fortnight'),
        'GAUSSIAN_YEAR'     => array('31558196', 'gaussian year'),
        'GIGASECOND'        => array('1.0e+9', 'Gs'),
        'GREAT_YEAR'        => array(array('*' => '31536000', '*' => '25700'), 'great year'),
        'GREGORIAN_YEAR'    => array('31536000', 'year'),
        'HOUR'              => array('3600', 'h'),
        'JULIAN_YEAR'       => array('31557600', 'a'),
        'KILOSECOND'        => array('1000', 'ks'),
        'LEAPYEAR'          => array('31622400', 'year'),
        'MEGASECOND'        => array('1000000', 'Ms'),
        'MICROSECOND'       => array('0.000001', 'µs'),
        'MILLENIUM'         => array('31536000000', 'millenium'),
        'MILLISECOND'       => array('0.001', 'ms'),
        'MINUTE'            => array('60', 'min'),
        'MONTH'             => array('2628600', 'month'),
        'NANOSECOND'        => array('1.0e-9', 'ns'),
        'PETASECOND'        => array('1.0e+15', 'Ps'),
        'PICOSECOND'        => array('1.0e-12', 'ps'),
        'QUARTER'           => array('7884000', 'quarter'),
        'SECOND'            => array('1', 's'),
        'SHAKE'             => array('1.0e-9', 'shake'),
        'SIDEREAL_YEAR'     => array('31558149.7676', 'sidereal year'),
        'TERASECOND'        => array('1.0e+12', 'Ts'),
        'TROPICAL_YEAR'     => array('31556925', 'tropical year'),
        'WEEK'              => array('604800', 'week'),
        'YEAR'              => array('31536000', 'year'),
        'STANDARD'          => 'SECOND'
    );
}


text:
<?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category  Zend
 * @package   Zend_Measure
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd     New BSD License
 * @version   $Id: Density.php 23775 2011-03-01 17:25:24Z ralph $
 */

/**
 * Implement needed classes
 */
require_once 'Zend/Measure/Abstract.php';
require_once 'Zend/Locale.php';

/**
 * Class for handling density conversions
 *
 * @category   Zend
 * @package    Zend_Measure
 * @subpackage Zend_Measure_Density
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Measure_Density extends Zend_Measure_Abstract
{
    const STANDARD = 'KILOGRAM_PER_CUBIC_METER';

    const ALUMINIUM                      = 'ALUMINIUM';
    const COPPER                         = 'COPPER';
    const GOLD                           = 'GOLD';
    const GRAIN_PER_CUBIC_FOOT           = 'GRAIN_PER_CUBIC_FOOT';
    const GRAIN_PER_CUBIC_INCH           = 'GRAIN_PER_CUBIC_INCH';
    const GRAIN_PER_CUBIC_YARD           = 'GRAIN_PER_CUBIC_YARD';
    const GRAIN_PER_GALLON               = 'GRAIN_PER_GALLON';
    const GRAIN_PER_GALLON_US            = 'GRAIN_PER_GALLON_US';
    const GRAM_PER_CUBIC_CENTIMETER      = 'GRAM_PER_CUBIC_CENTIMETER';
    const GRAM_PER_CUBIC_DECIMETER       = 'GRAM_PER_CUBIC_DECIMETER';
    const GRAM_PER_CUBIC_METER           = 'GRAM_PER_CUBIC_METER';
    const GRAM_PER_LITER                 = 'GRAM_PER_LITER';
    const GRAM_PER_MILLILITER            = 'GRAM_PER_MILLILITER';
    const IRON                           = 'IRON';
    const KILOGRAM_PER_CUBIC_CENTIMETER  = 'KILOGRAM_PER_CUBIC_CENTIMETER';
    const KILOGRAM_PER_CUBIC_DECIMETER   = 'KILOGRAM_PER_CUBIC_DECIMETER';
    const KILOGRAM_PER_CUBIC_METER       = 'KILOGRAM_PER_CUBIC_METER';
    const KILOGRAM_PER_CUBIC_MILLIMETER  = 'KILOGRAM_PER_CUBIC_MILLIMETER';
    const KILOGRAM_PER_LITER             = 'KILOGRAM_PER_LITER';
    const KILOGRAM_PER_MILLILITER        = 'KILOGRAM_PER_MILLILITER';
    const LEAD                           = 'LEAD';
    const MEGAGRAM_PER_CUBIC_CENTIMETER  = 'MEGAGRAM_PER_CUBIC_CENTIMETER';
    const MEGAGRAM_PER_CUBIC_DECIMETER   = 'MEGAGRAM_PER_CUBIC_DECIMETER';
    const MEGAGRAM_PER_CUBIC_METER       = 'MEGAGRAM_PER_CUBIC_METER';
    const MEGAGRAM_PER_LITER             = 'MEGAGRAM_PER_LITER';
    const MEGAGRAM_PER_MILLILITER        = 'MEGAGRAM_PER_MILLILITER';
    const MICROGRAM_PER_CUBIC_CENTIMETER = 'MICROGRAM_PER_CUBIC_CENTIMETER';
    const MICROGRAM_PER_CUBIC_DECIMETER  = 'MICROGRAM_PER_CUBIC_DECIMETER';
    const MICROGRAM_PER_CUBIC_METER      = 'MICROGRAM_PER_CUBIC_METER';
    const MICROGRAM_PER_LITER            = 'MICROGRAM_PER_LITER';
    const MICROGRAM_PER_MILLILITER       = 'MICROGRAM_PER_MILLILITER';
    const MILLIGRAM_PER_CUBIC_CENTIMETER = 'MILLIGRAM_PER_CUBIC_CENTIMETER';
    const MILLIGRAM_PER_CUBIC_DECIMETER  = 'MILLIGRAM_PER_CUBIC_DECIMETER';
    const MILLIGRAM_PER_CUBIC_METER      = 'MILLIGRAM_PER_CUBIC_METER';
    const MILLIGRAM_PER_LITER            = 'MILLIGRAM_PER_LITER';
    const MILLIGRAM_PER_MILLILITER       = 'MILLIGRAM_PER_MILLILITER';
    const OUNCE_PER_CUBIC_FOOT           = 'OUNCE_PER_CUBIC_FOOT';
    const OUNCR_PER_CUBIC_FOOT_TROY      = 'OUNCE_PER_CUBIC_FOOT_TROY';
    const OUNCE_PER_CUBIC_INCH           = 'OUNCE_PER_CUBIC_INCH';
    const OUNCE_PER_CUBIC_INCH_TROY      = 'OUNCE_PER_CUBIC_INCH_TROY';
    const OUNCE_PER_CUBIC_YARD           = 'OUNCE_PER_CUBIC_YARD';
    const OUNCE_PER_CUBIC_YARD_TROY      = 'OUNCE_PER_CUBIC_YARD_TROY';
    const OUNCE_PER_GALLON               = 'OUNCE_PER_GALLON';
    const OUNCE_PER_GALLON_US            = 'OUNCE_PER_GALLON_US';
    const OUNCE_PER_GALLON_TROY          = 'OUNCE_PER_GALLON_TROY';
    const OUNCE_PER_GALLON_US_TROY       = 'OUNCE_PER_GALLON_US_TROY';
    const POUND_PER_CIRCULAR_MIL_FOOT    = 'POUND_PER_CIRCULAR_MIL_FOOT';
    const POUND_PER_CUBIC_FOOT           = 'POUND_PER_CUBIC_FOOT';
    const POUND_PER_CUBIC_INCH           = 'POUND_PER_CUBIC_INCH';
    const POUND_PER_CUBIC_YARD           = 'POUND_PER_CUBIC_YARD';
    const POUND_PER_GALLON               = 'POUND_PER_GALLON';
    const POUND_PER_KILOGALLON           = 'POUND_PER_KILOGALLON';
    const POUND_PER_MEGAGALLON           = 'POUND_PER_MEGAGALLON';
    const POUND_PER_GALLON_US            = 'POUND_PER_GALLON_US';
    const POUND_PER_KILOGALLON_US        = 'POUND_PER_KILOGALLON_US';
    const POUND_PER_MEGAGALLON_US        = 'POUND_PER_MEGAGALLON_US';
    const SILVER                         = 'SILVER';
    const SLUG_PER_CUBIC_FOOT            = 'SLUG_PER_CUBIC_FOOT';
    const SLUG_PER_CUBIC_INCH            = 'SLUG_PER_CUBIC_INCH';
    const SLUG_PER_CUBIC_YARD            = 'SLUG_PER_CUBIC_YARD';
    const SLUG_PER_GALLON                = 'SLUG_PER_GALLON';
    const SLUG_PER_GALLON_US             = 'SLUG_PER_GALLON_US';
    const TON_PER_CUBIC_FOOT_LONG        = 'TON_PER_CUBIC_FOOT_LONG';
    const TON_PER_CUBIC_FOOT             = 'TON_PER_CUBIC_FOOT';
    const TON_PER_CUBIC_INCH_LONG        = 'TON_PER_CUBIC_INCH_LONG';
    const TON_PER_CUBIC_INCH             = 'TON_PER_CUBIC_INCH';
    const TON_PER_CUBIC_YARD_LONG        = 'TON_PER_CUBIC_YARD_LONG';
    const TON_PER_CUBIC_YARD             = 'TON_PER_CUBIC_YARD';
    const TON_PER_GALLON_LONG            = 'TON_PER_GALLON_LONG';
    const TON_PER_GALLON_US_LONG         = 'TON_PER_GALLON_US_LONG';
    const TON_PER_GALLON                 = 'TON_PER_GALLON';
    const TON_PER_GALLON_US              = 'TON_PER_GALLON_US';
    const TONNE_PER_CUBIC_CENTIMETER     = 'TONNE_PER_CUBIC_CENTIMETER';
    const TONNE_PER_CUBIC_DECIMETER      = 'TONNE_PER_CUBIC_DECIMETER';
    const TONNE_PER_CUBIC_METER          = 'TONNE_PER_CUBIC_METER';
    const TONNE_PER_LITER                = 'TONNE_PER_LITER';
    const TONNE_PER_MILLILITER           = 'TONNE_PER_MILLILITER';
    const WATER                          = 'WATER';

    /**
     * Calculations for all density units
     *
     * @var array
     */
    protected $_units = array(
        'ALUMINIUM'                 => array('2643',           'aluminium'),
        'COPPER'                    => array('8906',           'copper'),
        'GOLD'                      => array('19300',          'gold'),
        'GRAIN_PER_CUBIC_FOOT'      => array('0.0022883519',   'gr/ft³'),
        'GRAIN_PER_CUBIC_INCH'      => array('3.9542721',      'gr/in³'),
        'GRAIN_PER_CUBIC_YARD'      => array('0.000084753774', 'gr/yd³'),
        'GRAIN_PER_GALLON'          => array('0.014253768',    'gr/gal'),
        'GRAIN_PER_GALLON_US'       => array('0.017118061',    'gr/gal'),
        'GRAM_PER_CUBIC_CENTIMETER' => array('1000',           'g/cm³'),
        'GRAM_PER_CUBIC_DECIMETER'  => array('1',              'g/dm³'),
        'GRAM_PER_CUBIC_METER'      => array('0.001',          'g/m³'),
        'GRAM_PER_LITER'            => array('1',              'g/l'),
        'GRAM_PER_MILLILITER'       => array('1000',           'g/ml'),
        'IRON'                      => array('7658',           'iron'),
        'KILOGRAM_PER_CUBIC_CENTIMETER' => array('1000000',    'kg/cm³'),
        'KILOGRAM_PER_CUBIC_DECIMETER'  => array('1000',       'kg/dm³'),
        'KILOGRAM_PER_CUBIC_METER'  => array('1',              'kg/m³'),
        'KILOGRAM_PER_CUBIC_MILLIMETER' => array('1000000000', 'kg/l'),
        'KILOGRAM_PER_LITER'        => array('1000',           'kg/ml'),
        'KILOGRAM_PER_MILLILITER'   => array('1000000',        'kg/ml'),
        'LEAD'                      => array('11370',          'lead'),
        'MEGAGRAM_PER_CUBIC_CENTIMETER' => array('1.0e+9',     'Mg/cm³'),
        'MEGAGRAM_PER_CUBIC_DECIMETER'  => array('1000000',    'Mg/dm³'),
        'MEGAGRAM_PER_CUBIC_METER'  => array('1000',           'Mg/m³'),
        'MEGAGRAM_PER_LITER'        => array('1000000',        'Mg/l'),
        'MEGAGRAM_PER_MILLILITER'   => array('1.0e+9',         'Mg/ml'),
        'MICROGRAM_PER_CUBIC_CENTIMETER' => array('0.001',     'µg/cm³'),
        'MICROGRAM_PER_CUBIC_DECIMETER'  => array('1.0e-6',    'µg/dm³'),
        'MICROGRAM_PER_CUBIC_METER' => array('1.0e-9',         'µg/m³'),
        'MICROGRAM_PER_LITER'       => array('1.0e-6',         'µg/l'),
        'MICROGRAM_PER_MILLILITER'  => array('0.001',          'µg/ml'),
        'MILLIGRAM_PER_CUBIC_CENTIMETER' => array('1',         'mg/cm³'),
        'MILLIGRAM_PER_CUBIC_DECIMETER'  => array('0.001',     'mg/dm³'),
        'MILLIGRAM_PER_CUBIC_METER' => array('0.000001',       'mg/m³'),
        'MILLIGRAM_PER_LITER'       => array('0.001',          'mg/l'),
        'MILLIGRAM_PER_MILLILITER'  => array('1',              'mg/ml'),
        'OUNCE_PER_CUBIC_FOOT'      => array('1.001154',       'oz/ft³'),
        'OUNCE_PER_CUBIC_FOOT_TROY' => array('1.0984089',      'oz/ft³'),
        'OUNCE_PER_CUBIC_INCH'      => array('1729.994',       'oz/in³'),
        'OUNCE_PER_CUBIC_INCH_TROY' => array('1898.0506',      'oz/in³'),
        'OUNCE_PER_CUBIC_YARD'      => array('0.037079776',    'oz/yd³'),
        'OUNCE_PER_CUBIC_YARD_TROY' => array('0.040681812',    'oz/yd³'),
        'OUNCE_PER_GALLON'          => array('6.2360233',      'oz/gal'),
        'OUNCE_PER_GALLON_US'       => array('7.4891517',      'oz/gal'),
        'OUNCE_PER_GALLON_TROY'     => array('6.8418084',      'oz/gal'),
        'OUNCE_PER_GALLON_US_TROY'  => array('8.2166693',      'oz/gal'),
        'POUND_PER_CIRCULAR_MIL_FOOT' => array('2.9369291',    'lb/cmil ft'),
        'POUND_PER_CUBIC_FOOT'      => array('16.018463',      'lb/in³'),
        'POUND_PER_CUBIC_INCH'      => array('27679.905',      'lb/in³'),
        'POUND_PER_CUBIC_YARD'      => array('0.59327642',     'lb/yd³'),
        'POUND_PER_GALLON'          => array('99.776373',      'lb/gal'),
        'POUND_PER_KILOGALLON'      => array('0.099776373',    'lb/kgal'),
        'POUND_PER_MEGAGALLON'      => array('0.000099776373', 'lb/Mgal'),
        'POUND_PER_GALLON_US'       => array('119.82643',      'lb/gal'),
        'POUND_PER_KILOGALLON_US'   => array('0.11982643',     'lb/kgal'),
        'POUND_PER_MEGAGALLON_US'   => array('0.00011982643',  'lb/Mgal'),
        'SILVER'                    => array('10510',          'silver'),
        'SLUG_PER_CUBIC_FOOT'       => array('515.37882',      'slug/ft³'),
        'SLUG_PER_CUBIC_INCH'       => array('890574.6',       'slug/in³'),
        'SLUG_PER_CUBIC_YARD'       => array('19.088104',      'slug/yd³'),
        'SLUG_PER_GALLON'           => array('3210.2099',      'slug/gal'),
        'SLUG_PER_GALLON_US'        => array('3855.3013',      'slug/gal'),
        'TON_PER_CUBIC_FOOT_LONG'   => array('35881.358',      't/ft³'),
        'TON_PER_CUBIC_FOOT'        => array('32036.927',      't/ft³'),
        'TON_PER_CUBIC_INCH_LONG'   => array('6.2202987e+7',   't/in³'),
        'TON_PER_CUBIC_INCH'        => array('5.5359809e+7',   't/in³'),
        'TON_PER_CUBIC_YARD_LONG'   => array('1328.9392',      't/yd³'),
        'TON_PER_CUBIC_YARD'        => array('1186.5528',      't/yd³'),
        'TON_PER_GALLON_LONG'       => array('223499.07',      't/gal'),
        'TON_PER_GALLON_US_LONG'    => array('268411.2',       't/gal'),
        'TON_PER_GALLON'            => array('199522.75',      't/gal'),
        'TON_PER_GALLON_US'         => array('239652.85',      't/gal'),
        'TONNE_PER_CUBIC_CENTIMETER' => array('1.0e+9',        't/cm³'),
        'TONNE_PER_CUBIC_DECIMETER'  => array('1000000',       't/dm³'),
        'TONNE_PER_CUBIC_METER'     => array('1000',           't/m³'),
        'TONNE_PER_LITER'           => array('1000000',        't/l'),
        'TONNE_PER_MILLILITER'      => array('1.0e+9',         't/ml'),
        'WATER'                     => array('1000',           'water'),
        'STANDARD'                  => 'KILOGRAM_PER_CUBIC_METER'
    );
}