web/lib/Zend/Measure/Capacitance.php
changeset 64 162c1de6545a
parent 19 1c2f13fd785c
child 68 ecaf28ffe26e
equal deleted inserted replaced
63:5b37998e522e 64:162c1de6545a
       
     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: Capacitance.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 capacitance conversions
       
    30  *
       
    31  * @category   Zend
       
    32  * @package    Zend_Measure
       
    33  * @subpackage Zend_Measure_Capacitance
       
    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_Capacitance extends Zend_Measure_Abstract
       
    38 {
       
    39     const STANDARD = 'FARAD';
       
    40 
       
    41     const ABFARAD                = 'ABFARAD';
       
    42     const AMPERE_PER_SECOND_VOLT = 'AMPERE_PER_SECOND_VOLT';
       
    43     const CENTIFARAD             = 'CENTIFARAD';
       
    44     const COULOMB_PER_VOLT       = 'COULOMB_PER_VOLT';
       
    45     const DECIFARAD              = 'DECIFARAD';
       
    46     const DEKAFARAD              = 'DEKAFARAD';
       
    47     const ELECTROMAGNETIC_UNIT   = 'ELECTROMAGNETIC_UNIT';
       
    48     const ELECTROSTATIC_UNIT     = 'ELECTROSTATIC_UNIT';
       
    49     const FARAD                  = 'FARAD';
       
    50     const FARAD_INTERNATIONAL    = 'FARAD_INTERNATIONAL';
       
    51     const GAUSSIAN               = 'GAUSSIAN';
       
    52     const GIGAFARAD              = 'GIGAFARAD';
       
    53     const HECTOFARAD             = 'HECTOFARAD';
       
    54     const JAR                    = 'JAR';
       
    55     const KILOFARAD              = 'KILOFARAD';
       
    56     const MEGAFARAD              = 'MEGAFARAD';
       
    57     const MICROFARAD             = 'MICROFARAD';
       
    58     const MILLIFARAD             = 'MILLIFARAD';
       
    59     const NANOFARAD              = 'NANOFARAD';
       
    60     const PICOFARAD              = 'PICOFARAD';
       
    61     const PUFF                   = 'PUFF';
       
    62     const SECOND_PER_OHM         = 'SECOND_PER_OHM';
       
    63     const STATFARAD              = 'STATFARAD';
       
    64     const TERAFARAD              = 'TERAFARAD';
       
    65 
       
    66     /**
       
    67      * Calculations for all capacitance units
       
    68      *
       
    69      * @var array
       
    70      */
       
    71     protected $_units = array(
       
    72         'ABFARAD'              => array('1.0e+9',      'abfarad'),
       
    73         'AMPERE_PER_SECOND_VOLT' => array('1',         'A/sV'),
       
    74         'CENTIFARAD'           => array('0.01',        'cF'),
       
    75         'COULOMB_PER_VOLT'     => array('1',           'C/V'),
       
    76         'DECIFARAD'            => array('0.1',         'dF'),
       
    77         'DEKAFARAD'            => array('10',          'daF'),
       
    78         'ELECTROMAGNETIC_UNIT' => array('1.0e+9',      'capacity emu'),
       
    79         'ELECTROSTATIC_UNIT'   => array('1.11265e-12', 'capacity esu'),
       
    80         'FARAD'                => array('1',           'F'),
       
    81         'FARAD_INTERNATIONAL'  => array('0.99951',     'F'),
       
    82         'GAUSSIAN'             => array('1.11265e-12', 'G'),
       
    83         'GIGAFARAD'            => array('1.0e+9',      'GF'),
       
    84         'HECTOFARAD'           => array('100',         'hF'),
       
    85         'JAR'                  => array('1.11265e-9',  'jar'),
       
    86         'KILOFARAD'            => array('1000',        'kF'),
       
    87         'MEGAFARAD'            => array('1000000',     'MF'),
       
    88         'MICROFARAD'           => array('0.000001',    'µF'),
       
    89         'MILLIFARAD'           => array('0.001',       'mF'),
       
    90         'NANOFARAD'            => array('1.0e-9',      'nF'),
       
    91         'PICOFARAD'            => array('1.0e-12',     'pF'),
       
    92         'PUFF'                 => array('1.0e-12',     'pF'),
       
    93         'SECOND_PER_OHM'       => array('1',           's/Ohm'),
       
    94         'STATFARAD'            => array('1.11265e-12', 'statfarad'),
       
    95         'TERAFARAD'            => array('1.0e+12',     'TF'),
       
    96         'STANDARD'             => 'FARAD'
       
    97     );
       
    98 }