Zend Framework  1.12
Public Attributes | Protected Attributes | List of all members
Zend_Measure_Cooking_Weight Class Reference

Public Attributes

const STANDARD = 'GRAM'
 
const HALF_STICK = 'HALF_STICK'
 
const STICK = 'STICK'
 
const CUP = 'CUP'
 
const GRAM = 'GRAM'
 
const OUNCE = 'OUNCE'
 
const POUND = 'POUND'
 
const TEASPOON = 'TEASPOON'
 
const TEASPOON_US = 'TEASPOON_US'
 
const TABLESPOON = 'TABLESPOON'
 
const TABLESPOON_US = 'TABLESPOON_US'
 

Protected Attributes

 $_units
 
- Protected Attributes inherited from Zend_Measure_Abstract
 $_value
 Plain value in standard unit.
 
 $_type
 Original type for this unit.
 
 $_locale = null
 Locale identifier.
 
 $_units = array()
 Unit types for this measurement.
 

Additional Inherited Members

- Public Member Functions inherited from Zend_Measure_Abstract
 __construct ($value, $type=null, $locale=null)
 Zend_Measure_Abstract is an abstract class for the different measurement types.
 
 getLocale ()
 Returns the actual set locale.
 
 setLocale ($locale=null, $check=false)
 Sets a new locale for the value representation.
 
 getValue ($round=-1, $locale=null)
 Returns the internal value.
 
 setValue ($value, $type=null, $locale=null)
 Set a new value.
 
 getType ()
 Returns the original type.
 
 setType ($type)
 Set a new type, and convert the value.
 
 equals ($object)
 Compare if the value and type is equal.
 
 toString ($round=-1, $locale=null)
 Returns a string representation.
 
 __toString ()
 Returns a string representation.
 
 getConversionList ()
 Returns the conversion list.
 
 convertTo ($type, $round=2, $locale=null)
 Alias function for setType returning the converted unit.
 
 add ($object)
 Adds an unit to another one.
 
 sub ($object)
 Substracts an unit from another one.
 
 compare ($object)
 Compares two units.
 

Member Data Documentation

$_units
protected
Initial value:
= array(
'HALF_STICK' => array(array('' => '453.59237', '/' => '8'), 'half stk'),
'STICK' => array(array('' => '453.59237', '/' => '4'), 'stk'),
'CUP' => array(array('' => '453.59237', '/' => '2'), 'c'),
'GRAM' => array('1', 'g'),
'OUNCE' => array(array('' => '453.59237', '/' => '16'), 'oz'),
'POUND' => array('453.59237', 'lb'),
'TEASPOON' => array(array('' => '1.2503332', '' => '453.59237', '/' => '128'), 'tsp'),
'TEASPOON_US' => array(array('' => '453.59237', '/' => '96'), 'tsp'),
'TABLESPOON' => array(array('' => '1.2503332', '' => '453.59237', '/' => '32'), 'tbsp'),
'TABLESPOON_US' => array(array('' => '453.59237', '/' => '32'), 'tbsp'),
'STANDARD' => 'GRAM'
)
const CUP = 'CUP'
const GRAM = 'GRAM'
const HALF_STICK = 'HALF_STICK'
const OUNCE = 'OUNCE'
const POUND = 'POUND'
const STANDARD = 'GRAM'
const STICK = 'STICK'
const TABLESPOON = 'TABLESPOON'
const TABLESPOON_US = 'TABLESPOON_US'
const TEASPOON = 'TEASPOON'
const TEASPOON_US = 'TEASPOON_US'