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 temperature conversions
0030  *
0031  * @category   Zend
0032  * @package    Zend_Measure
0033  * @subpackage Zend_Measure_Lightness
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_Lightness extends Zend_Measure_Abstract
0038 {
0039     const STANDARD = 'CANDELA_PER_SQUARE_METER';
0040 
0041     const APOSTILB                          = 'APOSTILB';
0042     const BLONDEL                           = 'BLONDEL';
0043     const CANDELA_PER_SQUARE_CENTIMETER     = 'CANDELA_PER_SQUARE_CENTIMETER';
0044     const CANDELA_PER_SQUARE_FOOT           = 'CANDELA_PER_SQUARE_FOOT';
0045     const CANDELA_PER_SQUARE_INCH           = 'CANDELA_PER_SQUARE_INCH';
0046     const CANDELA_PER_SQUARE_METER          = 'CANDELA_PER_SQUARE_METER';
0047     const FOOTLAMBERT                       = 'FOOTLAMBERT';
0048     const KILOCANDELA_PER_SQUARE_CENTIMETER = 'KILOCANDELA_PER_SQUARE_CENTIMETER';
0049     const KILOCANDELA_PER_SQUARE_FOOT       = 'KILOCANDELA_PER_SQUARE_FOOT';
0050     const KILOCANDELA_PER_SQUARE_INCH       = 'KILOCANDELA_PER_SQUARE_INCH';
0051     const KILOCANDELA_PER_SQUARE_METER      = 'KILOCANDELA_PER_SQUARE_METER';
0052     const LAMBERT                           = 'LAMBERT';
0053     const MILLILAMBERT                      = 'MILLILAMBERT';
0054     const NIT                               = 'NIT';
0055     const STILB                             = 'STILB';
0056 
0057     /**
0058      * Calculations for all lightness units
0059      *
0060      * @var array
0061      */
0062     protected $_units = array(
0063         'APOSTILB'                      => array('0.31830989',   'asb'),
0064         'BLONDEL'                       => array('0.31830989',   'blondel'),
0065         'CANDELA_PER_SQUARE_CENTIMETER' => array('10000',        'cd/cm²'),
0066         'CANDELA_PER_SQUARE_FOOT'       => array('10.76391',     'cd/ft²'),
0067         'CANDELA_PER_SQUARE_INCH'       => array('1550.00304',   'cd/in²'),
0068         'CANDELA_PER_SQUARE_METER'      => array('1',            'cd/m²'),
0069         'FOOTLAMBERT'                   => array('3.4262591',    'ftL'),
0070         'KILOCANDELA_PER_SQUARE_CENTIMETER' => array('10000000', 'kcd/cm²'),
0071         'KILOCANDELA_PER_SQUARE_FOOT'   => array('10763.91',     'kcd/ft²'),
0072         'KILOCANDELA_PER_SQUARE_INCH'   => array('1550003.04',   'kcd/in²'),
0073         'KILOCANDELA_PER_SQUARE_METER'  => array('1000',         'kcd/m²'),
0074         'LAMBERT'                       => array('3183.0989',    'L'),
0075         'MILLILAMBERT'                  => array('3.1830989',    'mL'),
0076         'NIT'                           => array('1',            'nt'),
0077         'STILB'                         => array('10000',        'sb'),
0078         'STANDARD'                      => 'CANDELA_PER_SQUARE_METER'
0079     );
0080 }