File indexing completed on 2024-12-22 05:36:51
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 cooking volume conversions 0030 * 0031 * @category Zend 0032 * @package Zend_Measure 0033 * @subpackage Zend_Measure_Cooking_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_Cooking_Volume extends Zend_Measure_Abstract 0038 { 0039 const STANDARD = 'CUBIC_METER'; 0040 0041 const CAN_2POINT5 = 'CAN_2POINT5'; 0042 const CAN_10 = 'CAN_10'; 0043 const BARREL_WINE = 'BARREL_WINE'; 0044 const BARREL = 'BARREL'; 0045 const BARREL_US_DRY = 'BARREL_US_DRY'; 0046 const BARREL_US_FEDERAL = 'BARREL_US_FEDERAL'; 0047 const BARREL_US = 'BARREL_US'; 0048 const BUCKET = 'BUCKET'; 0049 const BUCKET_US = 'BUCKET_US'; 0050 const BUSHEL = 'BUSHEL'; 0051 const BUSHEL_US = 'BUSHEL_US'; 0052 const CENTILITER = 'CENTILITER'; 0053 const COFFEE_SPOON = 'COFFEE_SPOON'; 0054 const CUBIC_CENTIMETER = 'CUBIC_CENTIMETER'; 0055 const CUBIC_DECIMETER = 'CUBIC_DECIMETER'; 0056 const CUBIC_FOOT = 'CUBIC_FOOT'; 0057 const CUBIC_INCH = 'CUBIC_INCH'; 0058 const CUBIC_METER = 'CUBIC_METER'; 0059 const CUBIC_MICROMETER = 'CUBIC_MICROMETER'; 0060 const CUBIC_MILLIMETER = 'CUBIC_MILLIMETER'; 0061 const CUP_CANADA = 'CUP_CANADA'; 0062 const CUP = 'CUP'; 0063 const CUP_US = 'CUP_US'; 0064 const DASH = 'DASH'; 0065 const DECILITER = 'DECILITER'; 0066 const DEKALITER = 'DEKALITER'; 0067 const DEMI = 'DEMI'; 0068 const DRAM = 'DRAM'; 0069 const DROP = 'DROP'; 0070 const FIFTH = 'FIFTH'; 0071 const GALLON = 'GALLON'; 0072 const GALLON_US_DRY = 'GALLON_US_DRY'; 0073 const GALLON_US = 'GALLON_US'; 0074 const GILL = 'GILL'; 0075 const GILL_US = 'GILL_US'; 0076 const HECTOLITER = 'HECTOLITER'; 0077 const HOGSHEAD = 'HOGSHEAD'; 0078 const HOGSHEAD_US = 'HOGSHEAD_US'; 0079 const JIGGER = 'JIGGER'; 0080 const KILOLITER = 'KILOLITER'; 0081 const LITER = 'LITER'; 0082 const MEASURE = 'MEASURE'; 0083 const MEGALITER = 'MEGALITER'; 0084 const MICROLITER = 'MICROLITER'; 0085 const MILLILITER = 'MILLILITER'; 0086 const MINIM = 'MINIM'; 0087 const MINIM_US = 'MINIM_US'; 0088 const OUNCE = 'OUNCE'; 0089 const OUNCE_US = 'OUNCE_US'; 0090 const PECK = 'PECK'; 0091 const PECK_US = 'PECK_US'; 0092 const PINCH = 'PINCH'; 0093 const PINT = 'PINT'; 0094 const PINT_US_DRY = 'PINT_US_DRY'; 0095 const PINT_US = 'PINT_US'; 0096 const PIPE = 'PIPE'; 0097 const PIPE_US = 'PIPE_US'; 0098 const PONY = 'PONY'; 0099 const QUART_GERMANY = 'QUART_GERMANY'; 0100 const QUART_ANCIENT = 'QUART_ANCIENT'; 0101 const QUART = 'QUART'; 0102 const QUART_US_DRY = 'QUART_US_DRY'; 0103 const QUART_US = 'QUART_US'; 0104 const SHOT = 'SHOT'; 0105 const TABLESPOON = 'TABLESPOON'; 0106 const TABLESPOON_UK = 'TABLESPOON_UK'; 0107 const TABLESPOON_US = 'TABLESPOON_US'; 0108 const TEASPOON = 'TEASPOON'; 0109 const TEASPOON_UK = 'TEASPOON_UK'; 0110 const TEASPOON_US = 'TEASPOON_US'; 0111 0112 /** 0113 * Calculations for all cooking volume units 0114 * 0115 * @var array 0116 */ 0117 protected $_units = array( 0118 'CAN_2POINT5' => array(array('' => '0.0037854118', '/' => '16', '' => '3.5'), '2.5th can'), 0119 'CAN_10' => array(array('' => '0.0037854118', '*' => '0.75'), '10th can'), 0120 'BARREL_WINE' => array('0.143201835', 'bbl'), 0121 'BARREL' => array('0.16365924', 'bbl'), 0122 'BARREL_US_DRY' => array(array('' => '26.7098656608', '/' => '231'), 'bbl'), 0123 'BARREL_US_FEDERAL' => array('0.1173477658', 'bbl'), 0124 'BARREL_US' => array('0.1192404717', 'bbl'), 0125 'BUCKET' => array('0.01818436', 'bucket'), 0126 'BUCKET_US' => array('0.018927059', 'bucket'), 0127 'BUSHEL' => array('0.03636872', 'bu'), 0128 'BUSHEL_US' => array('0.03523907', 'bu'), 0129 'CENTILITER' => array('0.00001', 'cl'), 0130 'COFFEE_SPOON' => array(array('' => '0.0037854118', '/' => '1536'), 'coffee spoon'), 0131 'CUBIC_CENTIMETER' => array('0.000001', 'cm³'), 0132 'CUBIC_DECIMETER' => array('0.001', 'dm³'), 0133 'CUBIC_FOOT' => array(array('' => '6.54119159', '/' => '231'), 'ft³'), 0134 'CUBIC_INCH' => array(array('' => '0.0037854118', '/' => '231'), 'in³'), 0135 'CUBIC_METER' => array('1', 'm³'), 0136 'CUBIC_MICROMETER' => array('1.0e-18', 'µm³'), 0137 'CUBIC_MILLIMETER' => array('1.0e-9', 'mm³'), 0138 'CUP_CANADA' => array('0.0002273045', 'c'), 0139 'CUP' => array('0.00025', 'c'), 0140 'CUP_US' => array(array('' => '0.0037854118', '/' => '16'), 'c'), 0141 'DASH' => array(array('' => '0.0037854118', '/' => '6144'), 'ds'), 0142 'DECILITER' => array('0.0001', 'dl'), 0143 'DEKALITER' => array('0.001', 'dal'), 0144 'DEMI' => array('0.00025', 'demi'), 0145 'DRAM' => array(array('' => '0.0037854118', '/' => '1024'), 'dr'), 0146 'DROP' => array(array('' => '0.0037854118', '/' => '73728'), 'ggt'), 0147 'FIFTH' => array('0.00075708236', 'fifth'), 0148 'GALLON' => array('0.00454609', 'gal'), 0149 'GALLON_US_DRY' => array('0.0044048838', 'gal'), 0150 'GALLON_US' => array('0.0037854118', 'gal'), 0151 'GILL' => array(array('' => '0.00454609', '/' => '32'), 'gi'), 0152 'GILL_US' => array(array('' => '0.0037854118', '/' => '32'), 'gi'), 0153 'HECTOLITER' => array('0.1', 'hl'), 0154 'HOGSHEAD' => array('0.28640367', 'hhd'), 0155 'HOGSHEAD_US' => array('0.2384809434', 'hhd'), 0156 'JIGGER' => array(array('' => '0.0037854118', '/' => '128', '*' => '1.5'), 'jigger'), 0157 'KILOLITER' => array('1', 'kl'), 0158 'LITER' => array('0.001', 'l'), 0159 'MEASURE' => array('0.0077', 'measure'), 0160 'MEGALITER' => array('1000', 'Ml'), 0161 'MICROLITER' => array('1.0e-9', 'µl'), 0162 'MILLILITER' => array('0.000001', 'ml'), 0163 'MINIM' => array(array('' => '0.00454609', '/' => '76800'), 'min'), 0164 'MINIM_US' => array(array('' => '0.0037854118','/' => '61440'), 'min'), 0165 'OUNCE' => array(array('' => '0.00454609', '/' => '160'), 'oz'), 0166 'OUNCE_US' => array(array('' => '0.0037854118', '/' => '128'), 'oz'), 0167 'PECK' => array('0.00909218', 'pk'), 0168 'PECK_US' => array('0.0088097676', 'pk'), 0169 'PINCH' => array(array('' => '0.0037854118', '/' => '12288'), 'pinch'), 0170 'PINT' => array(array('' => '0.00454609', '/' => '8'), 'pt'), 0171 'PINT_US_DRY' => array(array('' => '0.0044048838', '/' => '8'), 'pt'), 0172 'PINT_US' => array(array('' => '0.0037854118', '/' => '8'), 'pt'), 0173 'PIPE' => array('0.49097772', 'pipe'), 0174 'PIPE_US' => array('0.4769618868', 'pipe'), 0175 'PONY' => array(array('' => '0.0037854118', '/' => '128'), 'pony'), 0176 'QUART_GERMANY' => array('0.00114504', 'qt'), 0177 'QUART_ANCIENT' => array('0.00108', 'qt'), 0178 'QUART' => array(array('' => '0.00454609', '/' => '4'), 'qt'), 0179 'QUART_US_DRY' => array(array('' => '0.0044048838', '/' => '4'), 'qt'), 0180 'QUART_US' => array(array('' => '0.0037854118', '/' => '4'), 'qt'), 0181 'SHOT' => array(array('' => '0.0037854118', '/' => '128'), 'shot'), 0182 'TABLESPOON' => array('0.000015', 'tbsp'), 0183 'TABLESPOON_UK' => array(array('' => '0.00454609', '/' => '320'), 'tbsp'), 0184 'TABLESPOON_US' => array(array('' => '0.0037854118', '/' => '256'), 'tbsp'), 0185 'TEASPOON' => array('0.000005', 'tsp'), 0186 'TEASPOON_UK' => array(array('' => '0.00454609', '/' => '1280'), 'tsp'), 0187 'TEASPOON_US' => array(array('' => '0.0037854118', '/' => '768'), 'tsp'), 0188 'STANDARD' => 'CUBIC_METER' 0189 ); 0190 }