Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Weight.php
Go to the documentation of this file.
1 <?php
25 #require_once 'Zend/Measure/Abstract.php';
26 #require_once 'Zend/Locale.php';
27 
38 {
39  const STANDARD = 'GRAM';
40 
41  const HALF_STICK = 'HALF_STICK';
42  const STICK = 'STICK';
43  const CUP = 'CUP';
44  const GRAM = 'GRAM';
45  const OUNCE = 'OUNCE';
46  const POUND = 'POUND';
47  const TEASPOON = 'TEASPOON';
48  const TEASPOON_US = 'TEASPOON_US';
49  const TABLESPOON = 'TABLESPOON';
50  const TABLESPOON_US = 'TABLESPOON_US';
51 
57  protected $_units = array(
58  'HALF_STICK' => array(array('' => '453.59237', '/' => '8'), 'half stk'),
59  'STICK' => array(array('' => '453.59237', '/' => '4'), 'stk'),
60  'CUP' => array(array('' => '453.59237', '/' => '2'), 'c'),
61  'GRAM' => array('1', 'g'),
62  'OUNCE' => array(array('' => '453.59237', '/' => '16'), 'oz'),
63  'POUND' => array('453.59237', 'lb'),
64  'TEASPOON' => array(array('' => '1.2503332', '' => '453.59237', '/' => '128'), 'tsp'),
65  'TEASPOON_US' => array(array('' => '453.59237', '/' => '96'), 'tsp'),
66  'TABLESPOON' => array(array('' => '1.2503332', '' => '453.59237', '/' => '32'), 'tbsp'),
67  'TABLESPOON_US' => array(array('' => '453.59237', '/' => '32'), 'tbsp'),
68  'STANDARD' => 'GRAM'
69  );
70 }