Lightness.php 3.5 KB

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