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

/libs/devblocks/libs/ZendFramework/Zend/Measure/Current.php

https://github.com/sluther/portsensor
PHP | 99 lines | 63 code | 6 blank | 30 comment | 0 complexity | 536e7c719336ae938f28b5d0349e1898 MD5 | raw file
Possible License(s): LGPL-2.1, 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-2007 Zend Technologies USA Inc. (http://www.zend.com)
  18. * @version $Id: Current.php 3224 2007-02-05 22:08:48Z gavin $
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. */
  21. /**
  22. * Implement needed classes
  23. */
  24. require_once 'Zend/Measure/Exception.php';
  25. require_once 'Zend/Measure/Abstract.php';
  26. require_once 'Zend/Locale.php';
  27. /**
  28. * @category Zend
  29. * @package Zend_Measure
  30. * @subpackage Zend_Measure_Current
  31. * @copyright Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)
  32. * @license http://framework.zend.com/license/new-bsd New BSD License
  33. */
  34. class Zend_Measure_Current extends Zend_Measure_Abstract
  35. {
  36. // Current definitions
  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. protected $_UNITS = array(
  65. 'ABAMPERE' => array(10, 'abampere'),
  66. 'AMPERE' => array(1, 'A'),
  67. 'BIOT' => array(10, 'Bi'),
  68. 'CENTIAMPERE' => array(0.01, 'cA'),
  69. 'COULOMB_PER_SECOND' => array(1, 'C/s'),
  70. 'DECIAMPERE' => array(0.1, 'dA'),
  71. 'DEKAAMPERE' => array(10, 'daA'),
  72. 'ELECTROMAGNATIC_UNIT' => array(10, 'current emu'),
  73. 'ELECTROSTATIC_UNIT' => array(3.335641e-10, 'current esu'),
  74. 'FRANCLIN_PER_SECOND' => array(3.335641e-10, 'Fr/s'),
  75. 'GAUSSIAN' => array(3.335641e-10, 'G current'),
  76. 'GIGAAMPERE' => array(1.0e+9, 'GA'),
  77. 'GILBERT' => array(0.79577472, 'Gi'),
  78. 'HECTOAMPERE' => array(100, 'hA'),
  79. 'KILOAMPERE' => array(1000, 'kA'),
  80. 'MEGAAMPERE' => array(1000000, 'MA') ,
  81. 'MICROAMPERE' => array(0.000001, 'µA'),
  82. 'MILLIAMPERE' => array(0.001, 'mA'),
  83. 'NANOAMPERE' => array(1.0e-9, 'nA'),
  84. 'PICOAMPERE' => array(1.0e-12, 'pA'),
  85. 'SIEMENS_VOLT' => array(1, 'SV'),
  86. 'STATAMPERE' => array(3.335641e-10, 'statampere'),
  87. 'TERAAMPERE' => array(1.0e+12, 'TA'),
  88. 'VOLT_PER_OHM' => array(1, 'V/Ohm'),
  89. 'WATT_PER_VOLT' => array(1, 'W/V'),
  90. 'WEBER_PER_HENRY' => array(1, 'Wb/H'),
  91. 'STANDARD' => 'AMPERE'
  92. );
  93. }