|
1 <?php |
|
2 /** |
|
3 * Zend Framework |
|
4 * |
|
5 * LICENSE |
|
6 * |
|
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. |
|
14 * |
|
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: Current.php 20096 2010-01-06 02:05:09Z bkarwin $ |
|
20 */ |
|
21 |
|
22 /** |
|
23 * Implement needed classes |
|
24 */ |
|
25 require_once 'Zend/Measure/Abstract.php'; |
|
26 require_once 'Zend/Locale.php'; |
|
27 |
|
28 /** |
|
29 * Class for handling current conversions |
|
30 * |
|
31 * @category Zend |
|
32 * @package Zend_Measure |
|
33 * @subpackage Zend_Measure_Current |
|
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 |
|
36 */ |
|
37 class Zend_Measure_Current extends Zend_Measure_Abstract |
|
38 { |
|
39 const STANDARD = 'AMPERE'; |
|
40 |
|
41 const ABAMPERE = 'ABAMPERE'; |
|
42 const AMPERE = 'AMPERE'; |
|
43 const BIOT = 'BIOT'; |
|
44 const CENTIAMPERE = 'CENTIAMPERE'; |
|
45 const COULOMB_PER_SECOND = 'COULOMB_PER_SECOND'; |
|
46 const DECIAMPERE = 'DECIAMPERE'; |
|
47 const DEKAAMPERE = 'DEKAAMPERE'; |
|
48 const ELECTROMAGNETIC_UNIT = 'ELECTROMAGNATIC_UNIT'; |
|
49 const ELECTROSTATIC_UNIT = 'ELECTROSTATIC_UNIT'; |
|
50 const FRANCLIN_PER_SECOND = 'FRANCLIN_PER_SECOND'; |
|
51 const GAUSSIAN = 'GAUSSIAN'; |
|
52 const GIGAAMPERE = 'GIGAAMPERE'; |
|
53 const GILBERT = 'GILBERT'; |
|
54 const HECTOAMPERE = 'HECTOAMPERE'; |
|
55 const KILOAMPERE = 'KILOAMPERE'; |
|
56 const MEGAAMPERE = 'MEGAAMPERE'; |
|
57 const MICROAMPERE = 'MICROAMPERE'; |
|
58 const MILLIAMPERE = 'MILLIAMPERE'; |
|
59 const NANOAMPERE = 'NANOAMPERE'; |
|
60 const PICOAMPERE = 'PICOAMPERE'; |
|
61 const SIEMENS_VOLT = 'SIEMENS_VOLT'; |
|
62 const STATAMPERE = 'STATAMPERE'; |
|
63 const TERAAMPERE = 'TERAAMPERE'; |
|
64 const VOLT_PER_OHM = 'VOLT_PER_OHM'; |
|
65 const WATT_PER_VOLT = 'WATT_PER_VOLT'; |
|
66 const WEBER_PER_HENRY = 'WEBER_PER_HENRY'; |
|
67 |
|
68 /** |
|
69 * Calculations for all current units |
|
70 * |
|
71 * @var array |
|
72 */ |
|
73 protected $_units = array( |
|
74 'ABAMPERE' => array('10', 'abampere'), |
|
75 'AMPERE' => array('1', 'A'), |
|
76 'BIOT' => array('10', 'Bi'), |
|
77 'CENTIAMPERE' => array('0.01', 'cA'), |
|
78 'COULOMB_PER_SECOND' => array('1', 'C/s'), |
|
79 'DECIAMPERE' => array('0.1', 'dA'), |
|
80 'DEKAAMPERE' => array('10', 'daA'), |
|
81 'ELECTROMAGNATIC_UNIT' => array('10', 'current emu'), |
|
82 'ELECTROSTATIC_UNIT' => array('3.335641e-10', 'current esu'), |
|
83 'FRANCLIN_PER_SECOND' => array('3.335641e-10', 'Fr/s'), |
|
84 'GAUSSIAN' => array('3.335641e-10', 'G current'), |
|
85 'GIGAAMPERE' => array('1.0e+9', 'GA'), |
|
86 'GILBERT' => array('0.79577472', 'Gi'), |
|
87 'HECTOAMPERE' => array('100', 'hA'), |
|
88 'KILOAMPERE' => array('1000', 'kA'), |
|
89 'MEGAAMPERE' => array('1000000', 'MA') , |
|
90 'MICROAMPERE' => array('0.000001', 'µA'), |
|
91 'MILLIAMPERE' => array('0.001', 'mA'), |
|
92 'NANOAMPERE' => array('1.0e-9', 'nA'), |
|
93 'PICOAMPERE' => array('1.0e-12', 'pA'), |
|
94 'SIEMENS_VOLT' => array('1', 'SV'), |
|
95 'STATAMPERE' => array('3.335641e-10', 'statampere'), |
|
96 'TERAAMPERE' => array('1.0e+12', 'TA'), |
|
97 'VOLT_PER_OHM' => array('1', 'V/Ohm'), |
|
98 'WATT_PER_VOLT' => array('1', 'W/V'), |
|
99 'WEBER_PER_HENRY' => array('1', 'Wb/H'), |
|
100 'STANDARD' => 'AMPERE' |
|
101 ); |
|
102 } |