PageRenderTime 42ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/www/system/library/Zend/Measure/Current.php

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