Class Zend_Measure

Description
  • license: New BSD License
  • copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Zend/Measure.php (line 36)


	
			
Class Constant Summary
 ACCELERATION = 'ACCELERATION'
 ANGLE = 'ANGLE'
 AREA = 'AREA'
 BINARY = 'BINARY'
 CAPACITANCE = 'CAPACITANCE'
 COOKING_VOLUME = 'COOKING_VOLUME'
 COOKING_WEIGHT = 'COOKING_WEIGHT'
 CURRENT = 'CURRENT'
 DENSITY = 'DENSITY'
 ENERGY = 'ENERGY'
 FLOW_MASS = 'FLOW_MASS'
 FLOW_MOLE = 'FLOW_MOLE'
 FLOW_VOLUME = 'FLOW_VOLUME'
 FORCE = 'FORCE'
 FREQUENCY = 'FREQUENCY'
 ILLUMINATION = 'ILLUMINATION'
 LENGTH = 'LENGTH'
 LIGHTNESS = 'LIGHTNESS'
 NUMBER = 'NUMBER'
 POWER = 'POWER'
 PRESSURE = 'PRESSURE'
 SPEED = 'SPEED'
 TEMPERATURE = 'TEMPERATURE'
 TORQUE = 'TORQUE'
 VISCOSITY_DYNAMIC = 'VISCOSITY_DYNAMIC'
 VISCOSITY_KINEMATIC = 'VISCOSITY_KINEMATIC'
 VOLUME = 'VOLUME'
 WEIGHT = 'WEIGHT'
Method Summary
 Zend_Measure add ($object $object)
 object compare ($object $object)
 void convertTo ($type $type)
 boolean equals ($object $object)
 array getAllTypes ()
 type getType ()
 array getTypeList ()
 value getValue ()
 Zend_Measure __construct ($value $value, $type $type, [$locale $locale = false])
 void serialize ()
 void setType ($type $type)
 void setValue ($value $value, [$type $type = null], [$locale $locale = null])
 Zend_Measure sub ($object $object)
 string toString ()
 void __toString ()
Methods
add (line 279)

Adds an unit to another one

  • return: object
  • access: public
Zend_Measure add ($object $object)
  • $object $object: object of same unit type
compare (line 311)

Compares two units

  • access: public
object compare ($object $object)
  • $object $object: object of same unit type
convertTo (line 266)

Alias function for setType returning the converted unit

  • access: public
void convertTo ($type $type)
  • $type $type: type
equals (line 165)

Compare if the value and type is equal

  • access: public
boolean equals ($object $object)
  • $object $object: object to compare equality
getAllTypes (line 325)

Returns a list of all types

  • access: public
array getAllTypes ()
getType (line 213)

Returns the original type

  • return: mixed
  • access: public
type getType ()
getTypeList (line 340)

Returns a list of all types from a unit

  • access: public
array getTypeList ()
getValue (line 176)

Returns the internal value

  • return: mixed
  • access: public
value getValue ()
Constructor __construct (line 116)

Zend_Measure_Area provides an locale aware class for conversion and formatting of area values

Zend_Measure $input can be a locale based input string or a value. $locale can be used to define that the input is made in a different language than the actual one.

  • access: public
  • throws: Zend_Measure_Exception
Zend_Measure __construct ($value $value, $type $type, [$locale $locale = false])
  • $value $value: mixed - Value as string, integer, real or float
  • $type $type: type - OPTIONAL a Zend_Measure_Area Type
  • $locale $locale: locale - OPTIONAL a Zend_Locale Type
serialize (line 153)

Serialize

  • access: public
void serialize ()
setType (line 225)

Set a new type, and convert the value

  • access: public
  • throws: Zend_Measure_Exception
void setType ($type $type)
  • $type $type: new type to set
setValue (line 190)

Set a new value

  • access: public
  • throws: Zend_Measure_Exception
void setValue ($value $value, [$type $type = null], [$locale $locale = null])
  • $value $value: mixed - Value as string, integer, real or float
  • $type $type: type - OPTIONAL a Zend_Measure_Temperature Type
  • $locale $locale: locale - OPTIONAL a Zend_Locale Type
sub (line 295)

Substracts an unit from another one

  • return: object
  • access: public
Zend_Measure sub ($object $object)
  • $object $object: object of same unit type
toString (line 244)

Returns a string representation

  • access: public
string toString ()
__toString (line 254)

Returns a string representation

Alias for toString()

  • access: public
void __toString ()
Class Constants
ACCELERATION = 'ACCELERATION' (line 39)
ANGLE = 'ANGLE' (line 40)
AREA = 'AREA' (line 41)
BINARY = 'BINARY' (line 42)
CAPACITANCE = 'CAPACITANCE' (line 43)
COOKING_VOLUME = 'COOKING_VOLUME' (line 44)
COOKING_WEIGHT = 'COOKING_WEIGHT' (line 45)
CURRENT = 'CURRENT' (line 46)
DENSITY = 'DENSITY' (line 47)
ENERGY = 'ENERGY' (line 48)
FLOW_MASS = 'FLOW_MASS' (line 50)
FLOW_MOLE = 'FLOW_MOLE' (line 51)
FLOW_VOLUME = 'FLOW_VOLUME' (line 52)
FORCE = 'FORCE' (line 49)
FREQUENCY = 'FREQUENCY' (line 53)
ILLUMINATION = 'ILLUMINATION' (line 54)
LENGTH = 'LENGTH' (line 55)
LIGHTNESS = 'LIGHTNESS' (line 56)
NUMBER = 'NUMBER' (line 57)
POWER = 'POWER' (line 58)
PRESSURE = 'PRESSURE' (line 59)
SPEED = 'SPEED' (line 60)
TEMPERATURE = 'TEMPERATURE' (line 61)
TORQUE = 'TORQUE' (line 62)
VISCOSITY_DYNAMIC = 'VISCOSITY_DYNAMIC' (line 63)
VISCOSITY_KINEMATIC = 'VISCOSITY_KINEMATIC' (line 64)
VOLUME = 'VOLUME' (line 65)
WEIGHT = 'WEIGHT' (line 66)

Documentation generated on Thu, 18 Jan 2007 09:56:39 -0800 by phpDocumentor 1.3.1