File indexing completed on 2024-05-12 06:02:47

0001 <?php
0002 /**
0003  * Zend Framework
0004  *
0005  * LICENSE
0006  *
0007  * This source file is subject to the new BSD license that is bundled
0008  * with this package in the file LICENSE.txt.
0009  * It is also available through the world-wide-web at this URL:
0010  * http://framework.zend.com/license/new-bsd
0011  * If you did not receive a copy of the license and are unable to
0012  * obtain it through the world-wide-web, please send an email
0013  * to license@zend.com so we can send you a copy immediately.
0014  *
0015  * @category  Zend
0016  * @package   Zend_Measure
0017  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0018  * @license   http://framework.zend.com/license/new-bsd     New BSD License
0019  * @version   $Id$
0020  */
0021 
0022 /**
0023  * Implement needed classes
0024  */
0025 // require_once 'Zend/Measure/Abstract.php';
0026 // require_once 'Zend/Locale.php';
0027 
0028 /**
0029  * Class for handling force conversions
0030  *
0031  * @category   Zend
0032  * @package    Zend_Measure
0033  * @subpackage Zend_Measure_Force
0034  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0035  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0036  */
0037 class Zend_Measure_Force extends Zend_Measure_Abstract
0038 {
0039     const STANDARD = 'NEWTON';
0040 
0041     const ATTONEWTON      = 'ATTONEWTON';
0042     const CENTINEWTON     = 'CENTINEWTON';
0043     const DECIGRAM_FORCE  = 'DECIGRAM_FORCE';
0044     const DECINEWTON      = 'DECINEWTON';
0045     const DEKAGRAM_FORCE  = 'DEKAGRAM_FORCE';
0046     const DEKANEWTON      = 'DEKANEWTON';
0047     const DYNE            = 'DYNE';
0048     const EXANEWTON       = 'EXANEWTON';
0049     const FEMTONEWTON     = 'FEMTONEWTON';
0050     const GIGANEWTON      = 'GIGANEWTON';
0051     const GRAM_FORCE      = 'GRAM_FORCE';
0052     const HECTONEWTON     = 'HECTONEWTON';
0053     const JOULE_PER_METER = 'JOULE_PER_METER';
0054     const KILOGRAM_FORCE  = 'KILOGRAM_FORCE';
0055     const KILONEWTON      = 'KILONEWTON';
0056     const KILOPOND        = 'KILOPOND';
0057     const KIP             = 'KIP';
0058     const MEGANEWTON      = 'MEGANEWTON';
0059     const MEGAPOND        = 'MEGAPOND';
0060     const MICRONEWTON     = 'MICRONEWTON';
0061     const MILLINEWTON     = 'MILLINEWTON';
0062     const NANONEWTON      = 'NANONEWTON';
0063     const NEWTON          = 'NEWTON';
0064     const OUNCE_FORCE     = 'OUNCE_FORCE';
0065     const PETANEWTON      = 'PETANEWTON';
0066     const PICONEWTON      = 'PICONEWTON';
0067     const POND            = 'POND';
0068     const POUND_FORCE     = 'POUND_FORCE';
0069     const POUNDAL         = 'POUNDAL';
0070     const STHENE          = 'STHENE';
0071     const TERANEWTON      = 'TERANEWTON';
0072     const TON_FORCE_LONG  = 'TON_FORCE_LONG';
0073     const TON_FORCE       = 'TON_FORCE';
0074     const TON_FORCE_SHORT = 'TON_FORCE_SHORT';
0075     const YOCTONEWTON     = 'YOCTONEWTON';
0076     const YOTTANEWTON     = 'YOTTANEWTON';
0077     const ZEPTONEWTON     = 'ZEPTONEWTON';
0078     const ZETTANEWTON     = 'ZETTANEWTON';
0079 
0080     /**
0081      * Calculations for all force units
0082      *
0083      * @var array
0084      */
0085     protected $_units = array(
0086         'ATTONEWTON'      => array('1.0e-18',     'aN'),
0087         'CENTINEWTON'     => array('0.01',        'cN'),
0088         'DECIGRAM_FORCE'  => array('0.000980665', 'dgf'),
0089         'DECINEWTON'      => array('0.1',         'dN'),
0090         'DEKAGRAM_FORCE'  => array('0.0980665',   'dagf'),
0091         'DEKANEWTON'      => array('10',          'daN'),
0092         'DYNE'            => array('0.00001',     'dyn'),
0093         'EXANEWTON'       => array('1.0e+18',     'EN'),
0094         'FEMTONEWTON'     => array('1.0e-15',     'fN'),
0095         'GIGANEWTON'      => array('1.0e+9',      'GN'),
0096         'GRAM_FORCE'      => array('0.00980665',  'gf'),
0097         'HECTONEWTON'     => array('100',         'hN'),
0098         'JOULE_PER_METER' => array('1',           'J/m'),
0099         'KILOGRAM_FORCE'  => array('9.80665',     'kgf'),
0100         'KILONEWTON'      => array('1000',        'kN'),
0101         'KILOPOND'        => array('9.80665',     'kp'),
0102         'KIP'             => array('4448.2216',   'kip'),
0103         'MEGANEWTON'      => array('1000000',     'Mp'),
0104         'MEGAPOND'        => array('9806.65',     'MN'),
0105         'MICRONEWTON'     => array('0.000001',    'µN'),
0106         'MILLINEWTON'     => array('0.001',       'mN'),
0107         'NANONEWTON'      => array('0.000000001', 'nN'),
0108         'NEWTON'          => array('1',           'N'),
0109         'OUNCE_FORCE'     => array('0.27801385',  'ozf'),
0110         'PETANEWTON'      => array('1.0e+15',     'PN'),
0111         'PICONEWTON'      => array('1.0e-12',     'pN'),
0112         'POND'            => array('0.00980665',  'pond'),
0113         'POUND_FORCE'     => array('4.4482216',   'lbf'),
0114         'POUNDAL'         => array('0.13825495',  'pdl'),
0115         'STHENE'          => array('1000',        'sn'),
0116         'TERANEWTON'      => array('1.0e+12',     'TN'),
0117         'TON_FORCE_LONG'  => array('9964.016384', 'tnf'),
0118         'TON_FORCE'       => array('9806.65',     'tnf'),
0119         'TON_FORCE_SHORT' => array('8896.4432',   'tnf'),
0120         'YOCTONEWTON'     => array('1.0e-24',     'yN'),
0121         'YOTTANEWTON'     => array('1.0e+24',     'YN'),
0122         'ZEPTONEWTON'     => array('1.0e-21',     'zN'),
0123         'ZETTANEWTON'     => array('1.0e+21',     'ZN'),
0124         'STANDARD'        => 'NEWTON'
0125     );
0126 }