Illumination.php 2.7 KB

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