~chroot64bit/zivios/gentoo-experimental

« back to all changes in this revision

Viewing changes to application/library/Zend/Measure/Illumination.php

  • Committer: Mustafa A. Hashmi
  • Date: 2008-12-04 13:32:21 UTC
  • Revision ID: mhashmi@zivios.org-20081204133221-0nd1trunwevijj38
Inclusion of new installation framework with ties to zend layout and dojo layout

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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-2008 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 9508 2008-05-23 10:56:41Z thomas $
 
20
 */
 
21
 
 
22
/**
 
23
 * Implement needed classes
 
24
 */
 
25
require_once 'Zend/Measure/Exception.php';
 
26
require_once 'Zend/Measure/Abstract.php';
 
27
require_once 'Zend/Locale.php';
 
28
 
 
29
/**
 
30
 * Class for handling illumination conversions
 
31
 *
 
32
 * @category   Zend
 
33
 * @package    Zend_Measure
 
34
 * @subpackage Zend_Measure_Illumination
 
35
 * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
 
36
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 
37
 */
 
38
class Zend_Measure_Illumination extends Zend_Measure_Abstract
 
39
{
 
40
    const STANDARD = 'LUX';
 
41
 
 
42
    const FOOTCANDLE                  = 'FOOTCANDLE';
 
43
    const KILOLUX                     = 'KILOLUX';
 
44
    const LUMEN_PER_SQUARE_CENTIMETER = 'LUMEN_PER_SQUARE_CENTIMETER';
 
45
    const LUMEN_PER_SQUARE_FOOT       = 'LUMEN_PER_SQUARE_FOOT';
 
46
    const LUMEN_PER_SQUARE_INCH       = 'LUMEN_PER_SQUARE_INCH';
 
47
    const LUMEN_PER_SQUARE_METER      = 'LUMEN_PER_SQUARE_METER';
 
48
    const LUX                         = 'LUX';
 
49
    const METERCANDLE                 = 'METERCANDLE';
 
50
    const MILLIPHOT                   = 'MILLIPHOT';
 
51
    const NOX                         = 'NOX';
 
52
    const PHOT                        = 'PHOT';
 
53
 
 
54
    /**
 
55
     * Calculations for all illumination units
 
56
     *
 
57
     * @var array
 
58
     */
 
59
    protected $_units = array(
 
60
        'FOOTCANDLE'              => array('10.7639104',   'fc'),
 
61
        'KILOLUX'                 => array('1000',         'klx'),
 
62
        'LUMEN_PER_SQUARE_CENTIMETER' => array('10000',    'lm/cm²'),
 
63
        'LUMEN_PER_SQUARE_FOOT'   => array('10.7639104',   'lm/ft²'),
 
64
        'LUMEN_PER_SQUARE_INCH'   => array('1550.0030976', 'lm/in²'),
 
65
        'LUMEN_PER_SQUARE_METER'  => array('1',            'lm/m²'),
 
66
        'LUX'                     => array('1',            'lx'),
 
67
        'METERCANDLE'             => array('1',            'metercandle'),
 
68
        'MILLIPHOT'               => array('10',           'mph'),
 
69
        'NOX'                     => array('0.001',        'nox'),
 
70
        'PHOT'                    => array('10000',        'ph'),
 
71
        'STANDARD'                => 'LUX'
 
72
    );
 
73
}