PageRenderTime 50ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

/library/Zend/Measure/Current.php

https://bitbucket.org/rtsukui/jelly2
PHP | 102 lines | 62 code | 4 blank | 36 comment | 0 complexity | 8aae41f74a0659af327200bb4c44e478 MD5 | raw file
Possible License(s): BSD-3-Clause
  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-2011 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 23775 2011-03-01 17:25:24Z ralph $
  20. */
  21. /**
  22. * Implement needed classes
  23. */
  24. require_once 'Zend/Measure/Abstract.php';
  25. require_once 'Zend/Locale.php';
  26. /**
  27. * Class for handling current conversions
  28. *
  29. * @category Zend
  30. * @package Zend_Measure
  31. * @subpackage Zend_Measure_Current
  32. * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
  33. * @license http://framework.zend.com/license/new-bsd New BSD License
  34. */
  35. class Zend_Measure_Current extends Zend_Measure_Abstract
  36. {
  37. const STANDARD = 'AMPERE';
  38. const ABAMPERE = 'ABAMPERE';
  39. const AMPERE = 'AMPERE';
  40. const BIOT = 'BIOT';
  41. const CENTIAMPERE = 'CENTIAMPERE';
  42. const COULOMB_PER_SECOND = 'COULOMB_PER_SECOND';
  43. const DECIAMPERE = 'DECIAMPERE';
  44. const DEKAAMPERE = 'DEKAAMPERE';
  45. const ELECTROMAGNETIC_UNIT = 'ELECTROMAGNATIC_UNIT';
  46. const ELECTROSTATIC_UNIT = 'ELECTROSTATIC_UNIT';
  47. const FRANCLIN_PER_SECOND = 'FRANCLIN_PER_SECOND';
  48. const GAUSSIAN = 'GAUSSIAN';
  49. const GIGAAMPERE = 'GIGAAMPERE';
  50. const GILBERT = 'GILBERT';
  51. const HECTOAMPERE = 'HECTOAMPERE';
  52. const KILOAMPERE = 'KILOAMPERE';
  53. const MEGAAMPERE = 'MEGAAMPERE';
  54. const MICROAMPERE = 'MICROAMPERE';
  55. const MILLIAMPERE = 'MILLIAMPERE';
  56. const NANOAMPERE = 'NANOAMPERE';
  57. const PICOAMPERE = 'PICOAMPERE';
  58. const SIEMENS_VOLT = 'SIEMENS_VOLT';
  59. const STATAMPERE = 'STATAMPERE';
  60. const TERAAMPERE = 'TERAAMPERE';
  61. const VOLT_PER_OHM = 'VOLT_PER_OHM';
  62. const WATT_PER_VOLT = 'WATT_PER_VOLT';
  63. const WEBER_PER_HENRY = 'WEBER_PER_HENRY';
  64. /**
  65. * Calculations for all current units
  66. *
  67. * @var array
  68. */
  69. protected $_units = array(
  70. 'ABAMPERE' => array('10', 'abampere'),
  71. 'AMPERE' => array('1', 'A'),
  72. 'BIOT' => array('10', 'Bi'),
  73. 'CENTIAMPERE' => array('0.01', 'cA'),
  74. 'COULOMB_PER_SECOND' => array('1', 'C/s'),
  75. 'DECIAMPERE' => array('0.1', 'dA'),
  76. 'DEKAAMPERE' => array('10', 'daA'),
  77. 'ELECTROMAGNATIC_UNIT' => array('10', 'current emu'),
  78. 'ELECTROSTATIC_UNIT' => array('3.335641e-10', 'current esu'),
  79. 'FRANCLIN_PER_SECOND' => array('3.335641e-10', 'Fr/s'),
  80. 'GAUSSIAN' => array('3.335641e-10', 'G current'),
  81. 'GIGAAMPERE' => array('1.0e+9', 'GA'),
  82. 'GILBERT' => array('0.79577472', 'Gi'),
  83. 'HECTOAMPERE' => array('100', 'hA'),
  84. 'KILOAMPERE' => array('1000', 'kA'),
  85. 'MEGAAMPERE' => array('1000000', 'MA') ,
  86. 'MICROAMPERE' => array('0.000001', 'µA'),
  87. 'MILLIAMPERE' => array('0.001', 'mA'),
  88. 'NANOAMPERE' => array('1.0e-9', 'nA'),
  89. 'PICOAMPERE' => array('1.0e-12', 'pA'),
  90. 'SIEMENS_VOLT' => array('1', 'SV'),
  91. 'STATAMPERE' => array('3.335641e-10', 'statampere'),
  92. 'TERAAMPERE' => array('1.0e+12', 'TA'),
  93. 'VOLT_PER_OHM' => array('1', 'V/Ohm'),
  94. 'WATT_PER_VOLT' => array('1', 'W/V'),
  95. 'WEBER_PER_HENRY' => array('1', 'Wb/H'),
  96. 'STANDARD' => 'AMPERE'
  97. );
  98. }