web/Zend/Measure/Illumination.php
changeset 0 4eba9c11703f
equal deleted inserted replaced
-1:000000000000 0:4eba9c11703f
       
     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: Illumination.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 illumination conversions
       
    30  *
       
    31  * @category   Zend
       
    32  * @package    Zend_Measure
       
    33  * @subpackage Zend_Measure_Illumination
       
    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_Illumination extends Zend_Measure_Abstract
       
    38 {
       
    39     const STANDARD = 'LUX';
       
    40 
       
    41     const FOOTCANDLE                  = 'FOOTCANDLE';
       
    42     const KILOLUX                     = 'KILOLUX';
       
    43     const LUMEN_PER_SQUARE_CENTIMETER = 'LUMEN_PER_SQUARE_CENTIMETER';
       
    44     const LUMEN_PER_SQUARE_FOOT       = 'LUMEN_PER_SQUARE_FOOT';
       
    45     const LUMEN_PER_SQUARE_INCH       = 'LUMEN_PER_SQUARE_INCH';
       
    46     const LUMEN_PER_SQUARE_METER      = 'LUMEN_PER_SQUARE_METER';
       
    47     const LUX                         = 'LUX';
       
    48     const METERCANDLE                 = 'METERCANDLE';
       
    49     const MILLIPHOT                   = 'MILLIPHOT';
       
    50     const NOX                         = 'NOX';
       
    51     const PHOT                        = 'PHOT';
       
    52 
       
    53     /**
       
    54      * Calculations for all illumination units
       
    55      *
       
    56      * @var array
       
    57      */
       
    58     protected $_units = array(
       
    59         'FOOTCANDLE'              => array('10.7639104',   'fc'),
       
    60         'KILOLUX'                 => array('1000',         'klx'),
       
    61         'LUMEN_PER_SQUARE_CENTIMETER' => array('10000',    'lm/cm²'),
       
    62         'LUMEN_PER_SQUARE_FOOT'   => array('10.7639104',   'lm/ft²'),
       
    63         'LUMEN_PER_SQUARE_INCH'   => array('1550.0030976', 'lm/in²'),
       
    64         'LUMEN_PER_SQUARE_METER'  => array('1',            'lm/m²'),
       
    65         'LUX'                     => array('1',            'lx'),
       
    66         'METERCANDLE'             => array('1',            'metercandle'),
       
    67         'MILLIPHOT'               => array('10',           'mph'),
       
    68         'NOX'                     => array('0.001',        'nox'),
       
    69         'PHOT'                    => array('10000',        'ph'),
       
    70         'STANDARD'                => 'LUX'
       
    71     );
       
    72 }