|
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: Mole.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 flow mole conversions |
|
30 * |
|
31 * @category Zend |
|
32 * @package Zend_Measure |
|
33 * @subpackage Zend_Measure_Flow_Mole |
|
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_Flow_Mole extends Zend_Measure_Abstract |
|
38 { |
|
39 const STANDARD = 'MOLE_PER_SECOND'; |
|
40 |
|
41 const CENTIMOLE_PER_DAY = 'CENTIMOLE_PER_DAY'; |
|
42 const CENTIMOLE_PER_HOUR = 'CENTIMOLE_PER_HOUR'; |
|
43 const CENTIMOLE_PER_MINUTE = 'CENTIMOLE_PER_MINUTE'; |
|
44 const CENTIMOLE_PER_SECOND = 'CENTIMOLE_PER_SECOND'; |
|
45 const MEGAMOLE_PER_DAY = 'MEGAMOLE_PER_DAY'; |
|
46 const MEGAMOLE_PER_HOUR = 'MEGAMOLE_PER_HOUR'; |
|
47 const MEGAMOLE_PER_MINUTE = 'MEGAMOLE_PER_MINUTE'; |
|
48 const MEGAMOLE_PER_SECOND = 'MEGAMOLE_PER_SECOND'; |
|
49 const MICROMOLE_PER_DAY = 'MICROMOLE_PER_DAY'; |
|
50 const MICROMOLE_PER_HOUR = 'MICROMOLE_PER_HOUR'; |
|
51 const MICROMOLE_PER_MINUTE = 'MICROMOLE_PER_MINUTE'; |
|
52 const MICROMOLE_PER_SECOND = 'MICROMOLE_PER_SECOND'; |
|
53 const MILLIMOLE_PER_DAY = 'MILLIMOLE_PER_DAY'; |
|
54 const MILLIMOLE_PER_HOUR = 'MILLIMOLE_PER_HOUR'; |
|
55 const MILLIMOLE_PER_MINUTE = 'MILLIMOLE_PER_MINUTE'; |
|
56 const MILLIMOLE_PER_SECOND = 'MILLIMOLE_PER_SECOND'; |
|
57 const MOLE_PER_DAY = 'MOLE_PER_DAY'; |
|
58 const MOLE_PER_HOUR = 'MOLE_PER_HOUR'; |
|
59 const MOLE_PER_MINUTE = 'MOLE_PER_MINUTE'; |
|
60 const MOLE_PER_SECOND = 'MOLE_PER_SECOND'; |
|
61 |
|
62 /** |
|
63 * Calculations for all flow mole units |
|
64 * |
|
65 * @var array |
|
66 */ |
|
67 protected $_units = array( |
|
68 'CENTIMOLE_PER_DAY' => array(array('' => '0.01', '/' => '86400'), 'cmol/day'), |
|
69 'CENTIMOLE_PER_HOUR' => array(array('' => '0.01', '/' => '3600'), 'cmol/h'), |
|
70 'CENTIMOLE_PER_MINUTE' => array(array('' => '0.01', '/' => '60'), 'cmol/m'), |
|
71 'CENTIMOLE_PER_SECOND' => array('0.01', 'cmol/s'), |
|
72 'MEGAMOLE_PER_DAY' => array(array('' => '1000000', '/' => '86400'), 'Mmol/day'), |
|
73 'MEGAMOLE_PER_HOUR' => array(array('' => '1000000', '/' => '3600'), 'Mmol/h'), |
|
74 'MEGAMOLE_PER_MINUTE' => array(array('' => '1000000', '/' => '60'), 'Mmol/m'), |
|
75 'MEGAMOLE_PER_SECOND' => array('1000000', 'Mmol/s'), |
|
76 'MICROMOLE_PER_DAY' => array(array('' => '0.000001', '/' => '86400'), 'µmol/day'), |
|
77 'MICROMOLE_PER_HOUR' => array(array('' => '0.000001', '/' => '3600'), 'µmol/h'), |
|
78 'MICROMOLE_PER_MINUTE' => array(array('' => '0.000001', '/' => '60'), 'µmol/m'), |
|
79 'MICROMOLE_PER_SECOND' => array('0.000001', 'µmol/s'), |
|
80 'MILLIMOLE_PER_DAY' => array(array('' => '0.001', '/' => '86400'), 'mmol/day'), |
|
81 'MILLIMOLE_PER_HOUR' => array(array('' => '0.001', '/' => '3600'), 'mmol/h'), |
|
82 'MILLIMOLE_PER_MINUTE' => array(array('' => '0.001', '/' => '60'), 'mmol/m'), |
|
83 'MILLIMOLE_PER_SECOND' => array('0.001', 'mmol/s'), |
|
84 'MOLE_PER_DAY' => array(array('' => '1', '/' => '86400'), 'mol/day'), |
|
85 'MOLE_PER_HOUR' => array(array('' => '1', '/' => '3600'), 'mol/h'), |
|
86 'MOLE_PER_MINUTE' => array(array('' => '1', '/' => '60'), 'mol/m'), |
|
87 'MOLE_PER_SECOND' => array('1', 'mol/s'), |
|
88 'STANDARD' => 'MOLE_PER_SECOND' |
|
89 ); |
|
90 } |