File indexing completed on 2024-12-22 05:36:51

0001 <?php
0002 /**
0003  * Zend Framework
0004  *
0005  * LICENSE
0006  *
0007  * This source file is subject to the new BSD license that is bundled
0008  * with this package in the file LICENSE.txt.
0009  * It is also available through the world-wide-web at this URL:
0010  * http://framework.zend.com/license/new-bsd
0011  * If you did not receive a copy of the license and are unable to
0012  * obtain it through the world-wide-web, please send an email
0013  * to license@zend.com so we can send you a copy immediately.
0014  *
0015  * @category  Zend
0016  * @package   Zend_Measure
0017  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0018  * @license   http://framework.zend.com/license/new-bsd     New BSD License
0019  * @version   $Id$
0020  */
0021 
0022 /**
0023  * Implement needed classes
0024  */
0025 // require_once 'Zend/Measure/Abstract.php';
0026 // require_once 'Zend/Locale.php';
0027 
0028 /**
0029  * Class for handling current conversions
0030  *
0031  * @category   Zend
0032  * @package    Zend_Measure
0033  * @subpackage Zend_Measure_Current
0034  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0035  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0036  */
0037 class Zend_Measure_Current extends Zend_Measure_Abstract
0038 {
0039     const STANDARD = 'AMPERE';
0040 
0041     const ABAMPERE             = 'ABAMPERE';
0042     const AMPERE               = 'AMPERE';
0043     const BIOT                 = 'BIOT';
0044     const CENTIAMPERE          = 'CENTIAMPERE';
0045     const COULOMB_PER_SECOND   = 'COULOMB_PER_SECOND';
0046     const DECIAMPERE           = 'DECIAMPERE';
0047     const DEKAAMPERE           = 'DEKAAMPERE';
0048     const ELECTROMAGNETIC_UNIT = 'ELECTROMAGNATIC_UNIT';
0049     const ELECTROSTATIC_UNIT   = 'ELECTROSTATIC_UNIT';
0050     const FRANCLIN_PER_SECOND  = 'FRANCLIN_PER_SECOND';
0051     const GAUSSIAN             = 'GAUSSIAN';
0052     const GIGAAMPERE           = 'GIGAAMPERE';
0053     const GILBERT              = 'GILBERT';
0054     const HECTOAMPERE          = 'HECTOAMPERE';
0055     const KILOAMPERE           = 'KILOAMPERE';
0056     const MEGAAMPERE           = 'MEGAAMPERE';
0057     const MICROAMPERE          = 'MICROAMPERE';
0058     const MILLIAMPERE          = 'MILLIAMPERE';
0059     const NANOAMPERE           = 'NANOAMPERE';
0060     const PICOAMPERE           = 'PICOAMPERE';
0061     const SIEMENS_VOLT         = 'SIEMENS_VOLT';
0062     const STATAMPERE           = 'STATAMPERE';
0063     const TERAAMPERE           = 'TERAAMPERE';
0064     const VOLT_PER_OHM         = 'VOLT_PER_OHM';
0065     const WATT_PER_VOLT        = 'WATT_PER_VOLT';
0066     const WEBER_PER_HENRY      = 'WEBER_PER_HENRY';
0067 
0068     /**
0069      * Calculations for all current units
0070      *
0071      * @var array
0072      */
0073     protected $_units = array(
0074         'ABAMPERE'             => array('10',           'abampere'),
0075         'AMPERE'               => array('1',            'A'),
0076         'BIOT'                 => array('10',           'Bi'),
0077         'CENTIAMPERE'          => array('0.01',         'cA'),
0078         'COULOMB_PER_SECOND'   => array('1',            'C/s'),
0079         'DECIAMPERE'           => array('0.1',          'dA'),
0080         'DEKAAMPERE'           => array('10',           'daA'),
0081         'ELECTROMAGNATIC_UNIT' => array('10',           'current emu'),
0082         'ELECTROSTATIC_UNIT'   => array('3.335641e-10', 'current esu'),
0083         'FRANCLIN_PER_SECOND'  => array('3.335641e-10', 'Fr/s'),
0084         'GAUSSIAN'             => array('3.335641e-10', 'G current'),
0085         'GIGAAMPERE'           => array('1.0e+9',       'GA'),
0086         'GILBERT'              => array('0.79577472',   'Gi'),
0087         'HECTOAMPERE'          => array('100',          'hA'),
0088         'KILOAMPERE'           => array('1000',         'kA'),
0089         'MEGAAMPERE'           => array('1000000',      'MA') ,
0090         'MICROAMPERE'          => array('0.000001',     'µA'),
0091         'MILLIAMPERE'          => array('0.001',        'mA'),
0092         'NANOAMPERE'           => array('1.0e-9',       'nA'),
0093         'PICOAMPERE'           => array('1.0e-12',      'pA'),
0094         'SIEMENS_VOLT'         => array('1',            'SV'),
0095         'STATAMPERE'           => array('3.335641e-10', 'statampere'),
0096         'TERAAMPERE'           => array('1.0e+12',      'TA'),
0097         'VOLT_PER_OHM'         => array('1',            'V/Ohm'),
0098         'WATT_PER_VOLT'        => array('1',            'W/V'),
0099         'WEBER_PER_HENRY'      => array('1',            'Wb/H'),
0100         'STANDARD'             => 'AMPERE'
0101     );
0102 }