Abstract Class Zend_Measure_Abstract

Description

Abstract class for all measurements

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

Located in /Measure/Abstract.php (line 46)


	
			
Direct descendents
Class Description
 class Zend_Measure_Acceleration Class for handling acceleration conversions
 class Zend_Measure_Speed Class for handling speed conversions
 class Zend_Measure_Time Class for handling time conversions
 class Zend_Measure_Volume Class for handling acceleration conversions
 class Zend_Measure_Length Class for handling length conversions
 class Zend_Measure_Angle Class for handling angle conversions
 class Zend_Measure_Force Class for handling force conversions
 class Zend_Measure_Viscosity_Kinematic Class for handling acceleration conversions
 class Zend_Measure_Viscosity_Dynamic Class for handling acceleration conversions
 class Zend_Measure_Frequency Class for handling flow volume conversions
 class Zend_Measure_Density Class for handling density conversions
 class Zend_Measure_Illumination Class for handling illumination conversions
 class Zend_Measure_Power Class for handling power conversions
 class Zend_Measure_Cooking_Volume Class for handling cooking volume conversions
 class Zend_Measure_Cooking_Weight Class for handling cooking weight conversions
 class Zend_Measure_Weight Class for handling weight conversions
 class Zend_Measure_Flow_Volume Class for handling flow volume conversions
 class Zend_Measure_Flow_Mole Class for handling flow mole conversions
 class Zend_Measure_Flow_Mass Class for handling flow mass conversions
 class Zend_Measure_Temperature Class for handling temperature conversions
 class Zend_Measure_Capacitance Class for handling capacitance conversions
 class Zend_Measure_Number Class for handling number conversions
 class Zend_Measure_Area Class for handling area conversions
 class Zend_Measure_Energy Class for handling energy conversions
 class Zend_Measure_Binary Class for handling binary conversions
 class Zend_Measure_Current Class for handling current conversions
 class Zend_Measure_Torque Class for handling torque conversions
 class Zend_Measure_Pressure Class for handling pressure conversions
 class Zend_Measure_Lightness Class for handling temperature conversions
Variable Summary
 string $_locale
 string $_type
 mixed $_units
 string $_value
Method Summary
 Zend_Measure_Abstract __construct ($value $value, [$type $type = null], [$locale $locale = null])
 Zend_Measure add ($object $object)
 boolean compare ($object $object)
 string convertTo (string $type, [integer $round = 2], [string|Zend_Locale $locale = null])
 boolean equals (Zend_Measure_Detailtype $object)
 string getLocale ()
 type getType ()
 void getValue ([integer $round = -1], [string|Zend_Locale $locale = null])
 Zend_Measure_Abstract setLocale ([string|Zend_Locale $locale = null], [boolean $check = false])
 void setType (string $type)
 void setValue (integer|string $value, [string $type = null], [string|Zend_Locale $locale = null])
 Zend_Measure sub ($object $object)
 string toString ([integer $round = -1], [string|Zend_Locale $locale = null])
 string __toString ()
Variables
string $_locale = null (line 67)

Locale identifier

  • access: protected
string $_type (line 60)

Original type for this unit

  • access: protected
mixed $_units = array() (line 72)

Unit types for this measurement

  • access: protected

Redefined in descendants as:
string $_value (line 53)

Plain value in standard unit

  • access: protected
Methods
Constructor __construct (line 82)

Zend_Measure_Abstract is an abstract class for the different measurement types

  • throws: Zend_Measure_Exception
  • access: public
Zend_Measure_Abstract __construct ($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_Area Type
  • $locale $locale: locale - OPTIONAL a Zend_Locale Type

Redefined in descendants as:
add (line 369)

Adds an unit to another one

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

Compares two units

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

Alias function for setType returning the converted unit

  • access: public
string convertTo (string $type, [integer $round = 2], [string|Zend_Locale $locale = null])
  • string $type: Constant Type
  • integer $round: (Optional) Rounds the value to a given precision
  • string|Zend_Locale $locale: (Optional) Locale to set for the number

Redefined in descendants as:
equals (line 304)

Compare if the value and type is equal

  • access: public
boolean equals (Zend_Measure_Detailtype $object)
  • Zend_Measure_Detailtype $object: object to compare
getConversionList (line 344)

Returns the conversion list

  • access: public
array getConversionList ()
getLocale (line 107)

Returns the actual set locale

  • access: public
string getLocale ()
getType (line 216)

Returns the original type

  • access: public
type getType ()
getValue (line 154)

Returns the internal value

  • access: public
void getValue ([integer $round = -1], [string|Zend_Locale $locale = null])
  • integer $round: (Optional) Rounds the value to an given precision, Default is -1 which returns without rounding
  • string|Zend_Locale $locale: (Optional) Locale for number representation
setLocale (line 119)

Sets a new locale for the value representation

  • access: public
Zend_Measure_Abstract setLocale ([string|Zend_Locale $locale = null], [boolean $check = false])
  • string|Zend_Locale $locale: (Optional) New locale to set
  • boolean $check: False, check but don't set; True, set the new locale
setType (line 227)

Set a new type, and convert the value

  • throws: Zend_Measure_Exception
  • access: public
void setType (string $type)
  • string $type: New type to set

Redefined in descendants as:
setValue (line 178)

Set a new value

  • throws: Zend_Measure_Exception
  • access: public
void setValue (integer|string $value, [string $type = null], [string|Zend_Locale $locale = null])
  • integer|string $value: Value as string, integer, real or float
  • string $type: OPTIONAL A Zend_Measure_Acceleration Type
  • string|Zend_Locale $locale: OPTIONAL Locale for parsing numbers

Redefined in descendants as:
sub (line 384)

Substracts an unit from another one

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

Returns a string representation

  • access: public
string toString ([integer $round = -1], [string|Zend_Locale $locale = null])
  • integer $round: (Optional) Runds the value to an given exception
  • string|Zend_Locale $locale: (Optional) Locale to set for the number
__toString (line 334)

Returns a string representation

  • access: public
string __toString ()

Documentation generated on Thu, 01 Apr 2010 12:53:39 -0400 by phpDocumentor 1.4.3