[ZF-6295] Generic:
[zend.git] / library / Zend / Measure / Lightness.php
blob1328d814c40c8ee44da10bb602bfbc2a1102ccf0
1 <?php
2 /**
3 * Zend Framework
5 * LICENSE
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.
15 * @category Zend
16 * @package Zend_Measure
17 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id$
22 /**
23 * Implement needed classes
25 require_once 'Zend/Measure/Abstract.php';
26 require_once 'Zend/Locale.php';
28 /**
29 * Class for handling temperature conversions
31 * @category Zend
32 * @package Zend_Measure
33 * @subpackage Zend_Measure_Lightness
34 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
35 * @license http://framework.zend.com/license/new-bsd New BSD License
37 class Zend_Measure_Lightness extends Zend_Measure_Abstract
39 const STANDARD = 'CANDELA_PER_SQUARE_METER';
41 const APOSTILB = 'APOSTILB';
42 const BLONDEL = 'BLONDEL';
43 const CANDELA_PER_SQUARE_CENTIMETER = 'CANDELA_PER_SQUARE_CENTIMETER';
44 const CANDELA_PER_SQUARE_FOOT = 'CANDELA_PER_SQUARE_FOOT';
45 const CANDELA_PER_SQUARE_INCH = 'CANDELA_PER_SQUARE_INCH';
46 const CANDELA_PER_SQUARE_METER = 'CANDELA_PER_SQUARE_METER';
47 const FOOTLAMBERT = 'FOOTLAMBERT';
48 const KILOCANDELA_PER_SQUARE_CENTIMETER = 'KILOCANDELA_PER_SQUARE_CENTIMETER';
49 const KILOCANDELA_PER_SQUARE_FOOT = 'KILOCANDELA_PER_SQUARE_FOOT';
50 const KILOCANDELA_PER_SQUARE_INCH = 'KILOCANDELA_PER_SQUARE_INCH';
51 const KILOCANDELA_PER_SQUARE_METER = 'KILOCANDELA_PER_SQUARE_METER';
52 const LAMBERT = 'LAMBERT';
53 const MILLILAMBERT = 'MILLILAMBERT';
54 const NIT = 'NIT';
55 const STILB = 'STILB';
57 /**
58 * Calculations for all lightness units
60 * @var array
62 protected $_units = array(
63 'APOSTILB' => array('0.31830989', 'asb'),
64 'BLONDEL' => array('0.31830989', 'blondel'),
65 'CANDELA_PER_SQUARE_CENTIMETER' => array('10000', 'cd/cm²'),
66 'CANDELA_PER_SQUARE_FOOT' => array('10.76391', 'cd/ft²'),
67 'CANDELA_PER_SQUARE_INCH' => array('1550.00304', 'cd/in²'),
68 'CANDELA_PER_SQUARE_METER' => array('1', 'cd/m²'),
69 'FOOTLAMBERT' => array('3.4262591', 'ftL'),
70 'KILOCANDELA_PER_SQUARE_CENTIMETER' => array('10000000', 'kcd/cm²'),
71 'KILOCANDELA_PER_SQUARE_FOOT' => array('10763.91', 'kcd/ft²'),
72 'KILOCANDELA_PER_SQUARE_INCH' => array('1550003.04', 'kcd/in²'),
73 'KILOCANDELA_PER_SQUARE_METER' => array('1000', 'kcd/m²'),
74 'LAMBERT' => array('3183.0989', 'L'),
75 'MILLILAMBERT' => array('3.1830989', 'mL'),
76 'NIT' => array('1', 'nt'),
77 'STILB' => array('10000', 'sb'),
78 'STANDARD' => 'CANDELA_PER_SQUARE_METER'