File indexing completed on 2024-12-22 05:36:52
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 acceleration conversions 0030 * 0031 * @category Zend 0032 * @package Zend_Measure 0033 * @subpackage Zend_Measure_Volume 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_Volume extends Zend_Measure_Abstract 0038 { 0039 const STANDARD = 'CUBIC_METER'; 0040 0041 const ACRE_FOOT = 'ACRE_FOOT'; 0042 const ACRE_FOOT_SURVEY = 'ACRE_FOOT_SURVEY'; 0043 const ACRE_INCH = 'ACRE_INCH'; 0044 const BARREL_WINE = 'BARREL_WINE'; 0045 const BARREL = 'BARREL'; 0046 const BARREL_US_DRY = 'BARREL_US_DRY'; 0047 const BARREL_US_FEDERAL = 'BARREL_US_FEDERAL'; 0048 const BARREL_US = 'BARREL_US'; 0049 const BARREL_US_PETROLEUM = 'BARREL_US_PETROLEUM'; 0050 const BOARD_FOOT = 'BOARD_FOOT'; 0051 const BUCKET = 'BUCKET'; 0052 const BUCKET_US = 'BUCKET_US'; 0053 const BUSHEL = 'BUSHEL'; 0054 const BUSHEL_US = 'BUSHEL_US'; 0055 const CENTILTER = 'CENTILITER'; 0056 const CORD = 'CORD'; 0057 const CORD_FOOT = 'CORD_FOOT'; 0058 const CUBIC_CENTIMETER = 'CUBIC_CENTIMETER'; 0059 const CUBIC_CUBIT = 'CUBIC_CUBIT'; 0060 const CUBIC_DECIMETER = 'CUBIC_DECIMETER'; 0061 const CUBIC_DEKAMETER = 'CUBIC_DEKAMETER'; 0062 const CUBIC_FOOT = 'CUBIC_FOOT'; 0063 const CUBIC_INCH = 'CUBIC_INCH'; 0064 const CUBIC_KILOMETER = 'CUBIC_KILOMETER'; 0065 const CUBIC_METER = 'CUBIC_METER'; 0066 const CUBIC_MILE = 'CUBIC_MILE'; 0067 const CUBIC_MICROMETER = 'CUBIC_MICROMETER'; 0068 const CUBIC_MILLIMETER = 'CUBIC_MILLIMETER'; 0069 const CUBIC_YARD = 'CUBIC_YARD'; 0070 const CUP_CANADA = 'CUP_CANADA'; 0071 const CUP = 'CUP'; 0072 const CUP_US = 'CUP_US'; 0073 const DECILITER = 'DECILITER'; 0074 const DEKALITER = 'DEKALITER'; 0075 const DRAM = 'DRAM'; 0076 const DRUM_US = 'DRUM_US'; 0077 const DRUM = 'DRUM'; 0078 const FIFTH = 'FIFTH'; 0079 const GALLON = 'GALLON'; 0080 const GALLON_US_DRY = 'GALLON_US_DRY'; 0081 const GALLON_US = 'GALLON_US'; 0082 const GILL = 'GILL'; 0083 const GILL_US = 'GILL_US'; 0084 const HECTARE_METER = 'HECTARE_METER'; 0085 const HECTOLITER = 'HECTOLITER'; 0086 const HOGSHEAD = 'HOGSHEAD'; 0087 const HOGSHEAD_US = 'HOGSHEAD_US'; 0088 const JIGGER = 'JIGGER'; 0089 const KILOLITER = 'KILOLITER'; 0090 const LITER = 'LITER'; 0091 const MEASURE = 'MEASURE'; 0092 const MEGALITER = 'MEGALITER'; 0093 const MICROLITER = 'MICROLITER'; 0094 const MILLILITER = 'MILLILITER'; 0095 const MINIM = 'MINIM'; 0096 const MINIM_US = 'MINIM_US'; 0097 const OUNCE = 'OUNCE'; 0098 const OUNCE_US = 'OUNCE_US'; 0099 const PECK = 'PECK'; 0100 const PECK_US = 'PECK_US'; 0101 const PINT = 'PINT'; 0102 const PINT_US_DRY = 'PINT_US_DRY'; 0103 const PINT_US = 'PINT_US'; 0104 const PIPE = 'PIPE'; 0105 const PIPE_US = 'PIPE_US'; 0106 const PONY = 'PONY'; 0107 const QUART_GERMANY = 'QUART_GERMANY'; 0108 const QUART_ANCIENT = 'QUART_ANCIENT'; 0109 const QUART = 'QUART'; 0110 const QUART_US_DRY = 'QUART_US_DRY'; 0111 const QUART_US = 'QUART_US'; 0112 const QUART_UK = 'QUART_UK'; 0113 const SHOT = 'SHOT'; 0114 const STERE = 'STERE'; 0115 const TABLESPOON = 'TABLESPOON'; 0116 const TABLESPOON_UK = 'TABLESPOON_UK'; 0117 const TABLESPOON_US = 'TABLESPOON_US'; 0118 const TEASPOON = 'TEASPOON'; 0119 const TEASPOON_UK = 'TEASPOON_UK'; 0120 const TEASPOON_US = 'TEASPOON_US'; 0121 const YARD = 'YARD'; 0122 0123 /** 0124 * Calculations for all volume units 0125 * 0126 * @var array 0127 */ 0128 protected $_units = array( 0129 'ACRE_FOOT' => array('1233.48185532', 'ac ft'), 0130 'ACRE_FOOT_SURVEY' => array('1233.489', 'ac ft'), 0131 'ACRE_INCH' => array('102.79015461', 'ac in'), 0132 'BARREL_WINE' => array('0.143201835', 'bbl'), 0133 'BARREL' => array('0.16365924', 'bbl'), 0134 'BARREL_US_DRY' => array(array('' => '26.7098656608', '/' => '231'), 'bbl'), 0135 'BARREL_US_FEDERAL' => array('0.1173477658', 'bbl'), 0136 'BARREL_US' => array('0.1192404717', 'bbl'), 0137 'BARREL_US_PETROLEUM' => array('0.1589872956', 'bbl'), 0138 'BOARD_FOOT' => array(array('' => '6.5411915904', '/' => '2772'), 'board foot'), 0139 'BUCKET' => array('0.01818436', 'bucket'), 0140 'BUCKET_US' => array('0.018927059', 'bucket'), 0141 'BUSHEL' => array('0.03636872', 'bu'), 0142 'BUSHEL_US' => array('0.03523907', 'bu'), 0143 'CENTILITER' => array('0.00001', 'cl'), 0144 'CORD' => array('3.624556416', 'cd'), 0145 'CORD_FOOT' => array('0.453069552', 'cd ft'), 0146 'CUBIC_CENTIMETER' => array('0.000001', 'cm³'), 0147 'CUBIC_CUBIT' => array('0.144', 'cubit³'), 0148 'CUBIC_DECIMETER' => array('0.001', 'dm³'), 0149 'CUBIC_DEKAMETER' => array('1000', 'dam³'), 0150 'CUBIC_FOOT' => array(array('' => '6.54119159', '/' => '231'), 'ft³'), 0151 'CUBIC_INCH' => array(array('' => '0.0037854118', '/' => '231'), 'in³'), 0152 'CUBIC_KILOMETER' => array('1.0e+9', 'km³'), 0153 'CUBIC_METER' => array('1', 'm³'), 0154 'CUBIC_MILE' => array(array('' => '0.0037854118', '/' => '231', '*' => '75271680', '*' => '3379200'), 0155 'mi³'), 0156 'CUBIC_MICROMETER' => array('1.0e-18', 'µm³'), 0157 'CUBIC_MILLIMETER' => array('1.0e-9', 'mm³'), 0158 'CUBIC_YARD' => array(array('' => '0.0037854118', '/' => '231', '*' => '46656'), 'yd³'), 0159 'CUP_CANADA' => array('0.0002273045', 'c'), 0160 'CUP' => array('0.00025', 'c'), 0161 'CUP_US' => array(array('' => '0.0037854118', '/' => '16'), 'c'), 0162 'DECILITER' => array('0.0001', 'dl'), 0163 'DEKALITER' => array('0.001', 'dal'), 0164 'DRAM' => array(array('' => '0.0037854118', '/' => '1024'), 'dr'), 0165 'DRUM_US' => array('0.208197649', 'drum'), 0166 'DRUM' => array('0.2', 'drum'), 0167 'FIFTH' => array('0.00075708236', 'fifth'), 0168 'GALLON' => array('0.00454609', 'gal'), 0169 'GALLON_US_DRY' => array('0.0044048838', 'gal'), 0170 'GALLON_US' => array('0.0037854118', 'gal'), 0171 'GILL' => array(array('' => '0.00454609', '/' => '32'), 'gi'), 0172 'GILL_US' => array(array('' => '0.0037854118', '/' => '32'), 'gi'), 0173 'HECTARE_METER' => array('10000', 'ha m'), 0174 'HECTOLITER' => array('0.1', 'hl'), 0175 'HOGSHEAD' => array('0.28640367', 'hhd'), 0176 'HOGSHEAD_US' => array('0.2384809434', 'hhd'), 0177 'JIGGER' => array(array('' => '0.0037854118', '/' => '128', '*' => '1.5'), 'jigger'), 0178 'KILOLITER' => array('1', 'kl'), 0179 'LITER' => array('0.001', 'l'), 0180 'MEASURE' => array('0.0077', 'measure'), 0181 'MEGALITER' => array('1000', 'Ml'), 0182 'MICROLITER' => array('1.0e-9', 'µl'), 0183 'MILLILITER' => array('0.000001', 'ml'), 0184 'MINIM' => array(array('' => '0.00454609', '/' => '76800'), 'min'), 0185 'MINIM_US' => array(array('' => '0.0037854118','/' => '61440'), 'min'), 0186 'OUNCE' => array(array('' => '0.00454609', '/' => '160'), 'oz'), 0187 'OUNCE_US' => array(array('' => '0.0037854118', '/' => '128'), 'oz'), 0188 'PECK' => array('0.00909218', 'pk'), 0189 'PECK_US' => array('0.0088097676', 'pk'), 0190 'PINT' => array(array('' => '0.00454609', '/' => '8'), 'pt'), 0191 'PINT_US_DRY' => array(array('' => '0.0044048838', '/' => '8'), 'pt'), 0192 'PINT_US' => array(array('' => '0.0037854118', '/' => '8'), 'pt'), 0193 'PIPE' => array('0.49097772', 'pipe'), 0194 'PIPE_US' => array('0.4769618868', 'pipe'), 0195 'PONY' => array(array('' => '0.0037854118', '/' => '128'), 'pony'), 0196 'QUART_GERMANY' => array('0.00114504', 'qt'), 0197 'QUART_ANCIENT' => array('0.00108', 'qt'), 0198 'QUART' => array(array('' => '0.00454609', '/' => '4'), 'qt'), 0199 'QUART_US_DRY' => array(array('' => '0.0044048838', '/' => '4'), 'qt'), 0200 'QUART_US' => array(array('' => '0.0037854118', '/' => '4'), 'qt'), 0201 'QUART_UK' => array('0.29094976', 'qt'), 0202 'SHOT' => array(array('' => '0.0037854118', '/' => '128'), 'shot'), 0203 'STERE' => array('1', 'st'), 0204 'TABLESPOON' => array('0.000015', 'tbsp'), 0205 'TABLESPOON_UK' => array(array('' => '0.00454609', '/' => '320'), 'tbsp'), 0206 'TABLESPOON_US' => array(array('' => '0.0037854118', '/' => '256'), 'tbsp'), 0207 'TEASPOON' => array('0.000005', 'tsp'), 0208 'TEASPOON_UK' => array(array('' => '0.00454609', '/' => '1280'), 'tsp'), 0209 'TEASPOON_US' => array(array('' => '0.0037854118', '/' => '768'), 'tsp'), 0210 'YARD' => array(array('' => '176.6121729408', '/' => '231'), 'yd'), 0211 'STANDARD' => 'CUBIC_METER' 0212 ); 0213 }