[ZF-10089] Zend_Log
[zend/radio.git] / library / Zend / Measure / Torque.php
blobcfd7a5e9691f17d67f76dd08b50d15e86dec20ef
1 <?php
2 /**
3 * Zend Framework
5 * LICENSE
7 * This source file is subject to the new BSD license that is bundled
8 * with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://framework.zend.com/license/new-bsd
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
13 * to license@zend.com so we can send you a copy immediately.
15 * @category Zend
16 * @package Zend_Measure
17 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id$
22 /**
23 * Implement needed classes
25 require_once 'Zend/Measure/Abstract.php';
26 require_once 'Zend/Locale.php';
28 /**
29 * Class for handling torque conversions
31 * @category Zend
32 * @package Zend_Measure
33 * @subpackage Zend_Measure_Torque
34 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
35 * @license http://framework.zend.com/license/new-bsd New BSD License
37 class Zend_Measure_Torque extends Zend_Measure_Abstract
39 const STANDARD = 'NEWTON_METER';
41 const DYNE_CENTIMETER = 'DYNE_CENTIMETER';
42 const GRAM_CENTIMETER = 'GRAM_CENTIMETER';
43 const KILOGRAM_CENTIMETER = 'KILOGRAM_CENTIMETER';
44 const KILOGRAM_METER = 'KILOGRAM_METER';
45 const KILONEWTON_METER = 'KILONEWTON_METER';
46 const KILOPOND_METER = 'KILOPOND_METER';
47 const MEGANEWTON_METER = 'MEGANEWTON_METER';
48 const MICRONEWTON_METER = 'MICRONEWTON_METER';
49 const MILLINEWTON_METER = 'MILLINEWTON_METER';
50 const NEWTON_CENTIMETER = 'NEWTON_CENTIMETER';
51 const NEWTON_METER = 'NEWTON_METER';
52 const OUNCE_FOOT = 'OUNCE_FOOT';
53 const OUNCE_INCH = 'OUNCE_INCH';
54 const POUND_FOOT = 'POUND_FOOT';
55 const POUNDAL_FOOT = 'POUNDAL_FOOT';
56 const POUND_INCH = 'POUND_INCH';
58 /**
59 * Calculations for all torque units
61 * @var array
63 protected $_units = array(
64 'DYNE_CENTIMETER' => array('0.0000001', 'dyncm'),
65 'GRAM_CENTIMETER' => array('0.0000980665', 'gcm'),
66 'KILOGRAM_CENTIMETER' => array('0.0980665', 'kgcm'),
67 'KILOGRAM_METER' => array('9.80665', 'kgm'),
68 'KILONEWTON_METER' => array('1000', 'kNm'),
69 'KILOPOND_METER' => array('9.80665', 'kpm'),
70 'MEGANEWTON_METER' => array('1000000', 'MNm'),
71 'MICRONEWTON_METER' => array('0.000001', 'µNm'),
72 'MILLINEWTON_METER' => array('0.001', 'mNm'),
73 'NEWTON_CENTIMETER' => array('0.01', 'Ncm'),
74 'NEWTON_METER' => array('1', 'Nm'),
75 'OUNCE_FOOT' => array('0.084738622', 'ozft'),
76 'OUNCE_INCH' => array(array('' => '0.084738622', '/' => '12'), 'ozin'),
77 'POUND_FOOT' => array(array('' => '0.084738622', '*' => '16'), 'lbft'),
78 'POUNDAL_FOOT' => array('0.0421401099752144', 'plft'),
79 'POUND_INCH' => array(array('' => '0.084738622', '/' => '12', '*' => '16'), 'lbin'),
80 'STANDARD' => 'NEWTON_METER'