File indexing completed on 2025-02-23 05:32:33
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_Temperature 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_Temperature extends Zend_Measure_Abstract 0038 { 0039 const STANDARD = 'KELVIN'; 0040 0041 const CELSIUS = 'CELSIUS'; 0042 const FAHRENHEIT = 'FAHRENHEIT'; 0043 const RANKINE = 'RANKINE'; 0044 const REAUMUR = 'REAUMUR'; 0045 const KELVIN = 'KELVIN'; 0046 0047 /** 0048 * Calculations for all temperature units 0049 * 0050 * @var array 0051 */ 0052 protected $_units = array( 0053 'CELSIUS' => array(array('' => '1', '+' => '273.15'),'°C'), 0054 'FAHRENHEIT' => array(array('' => '1', '-' => '32', '/' => '1.8', '+' => '273.15'),'°F'), 0055 'RANKINE' => array(array('' => '1', '/' => '1.8'),'°R'), 0056 'REAUMUR' => array(array('' => '1', '*' => '1.25', '+' => '273.15'),'°r'), 0057 'KELVIN' => array(1,'°K'), 0058 'STANDARD' => 'KELVIN' 0059 ); 0060 }