## Zend_Measure_Abstract

Description

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

Located in /Zend/Measure/Abstract.php (line 33)

Direct descendents

Class | Description
--- | ---
Zend_Measure_Acceleration |
Zend_Measure_Angle |
Zend_Measure_Area |
Zend_Measure_Binary |
Zend_Measure_Capacitance |
Zend_Measure_Cooking_Volume |
Zend_Measure_Cooking_Weight |
Zend_Measure_Current |
Zend_Measure_Density |
Zend_Measure_Energy |
Zend_Measure_Flow_Mass |
Zend_Measure_Flow_Mole |
Zend_Measure_Flow_Volume |
Zend_Measure_Force |
Zend_Measure_Frequency |
Zend_Measure_Illumination |
Zend_Measure_Length |
Zend_Measure_Lightness |
Zend_Measure_Number |
Zend_Measure_Power |
Zend_Measure_Pressure |
Zend_Measure_Speed |
Zend_Measure_Temperature |
Zend_Measure_Torque |
Zend_Measure_Viscosity_Dynamic |
Zend_Measure_Viscosity_Kinematic |
Zend_Measure_Volume |
Zend_Measure_Weight |

Variable Summary
mixed $_Locale
mixed $_type
mixed $_UNITS
mixed $_value
Method Summary
Zend_Measure_Abstract __construct ($value $value, [$type $type = null], [$locale $locale = null])
Zend_Measure add ($object $object)
boolean compare ($object $object)
void convertTo ($type $type)
boolean equals (Zend_Measure_Detailtype $object)
array getConversionList ()
type getType ()
void getValue ()
void setType (string $type)
void setValue (integer|string $value, [string $type = null], [string|Zend_Locale $locale = null])
Zend_Measure sub ($object $object)
string toString ()
string __toString ()
Variables
mixed $_Locale = null (line 51)

Internal locale identifier

- access: protected

mixed $_type (line 45)

internal original type for this unit

- access: protected

mixed $_UNITS = array() (line 57)

Unit types for this measurement

- access: protected

Redefined in descendants as:

- Zend_Measure_Acceleration::$_UNITS
- Zend_Measure_Angle::$_UNITS
- Zend_Measure_Area::$_UNITS
- Zend_Measure_Binary::$_UNITS
- Zend_Measure_Capacitance::$_UNITS
- Zend_Measure_Cooking_Volume::$_UNITS
- Zend_Measure_Cooking_Weight::$_UNITS
- Zend_Measure_Current::$_UNITS
- Zend_Measure_Density::$_UNITS
- Zend_Measure_Energy::$_UNITS
- Zend_Measure_Flow_Mass::$_UNITS
- Zend_Measure_Flow_Mole::$_UNITS
- Zend_Measure_Flow_Volume::$_UNITS
- Zend_Measure_Force::$_UNITS
- Zend_Measure_Frequency::$_UNITS
- Zend_Measure_Illumination::$_UNITS
- Zend_Measure_Length::$_UNITS
- Zend_Measure_Lightness::$_UNITS
- Zend_Measure_Number::$_UNITS
- Zend_Measure_Power::$_UNITS
- Zend_Measure_Pressure::$_UNITS
- Zend_Measure_Speed::$_UNITS
- Zend_Measure_Temperature::$_UNITS
- Zend_Measure_Torque::$_UNITS
- Zend_Measure_Viscosity_Dynamic::$_UNITS
- Zend_Measure_Viscosity_Kinematic::$_UNITS
- Zend_Measure_Volume::$_UNITS
- Zend_Measure_Weight::$_UNITS

mixed $_value (line 39)

internal plain value in standard unit

- access: protected

Methods
Constructor __construct (line 68)

Zend_Measure_Abstract is an abstract class for the different measurement types

- access: public
- throws: Zend_Measure_Exception

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:

- Zend_Measure_Number::__construct() : Zend_Measure_Abstract is an abstract class for the different measurement types

add (line 307)

Adds an unit to another one

- return: object
- access: public

Zend_Measure add ($object $object)

- $object $object: object of same unit type

compare (line 339)

Compares two units

- access: public

boolean compare ($object $object)

- $object $object: object of same unit type

convertTo (line 294)

Alias function for setType returning the converted unit

- access: public

void convertTo ($type $type)

- $type $type: type

equals (line 243)

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 282)

Returns the conversion list

- access: public

array getConversionList ()
getType (line 160)

Returns the original type

- access: public

type getType ()
getValue (line 103)

Returns the internal value

- access: public

void getValue ()
setType (line 172)

Set a new type, and convert the value

- access: public
- throws: Zend_Measure_Exception

void setType (string $type)

- string $type: New type to set

Redefined in descendants as:

- Zend_Measure_Number::setType() : Set a new type, and convert the value

setValue (line 117)

Set a new value

- access: public
- throws: Zend_Measure_Exception

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:

- Zend_Measure_Number::setValue() : Set a new value

sub (line 323)

Substracts an unit from another one

- return: object
- access: public

Zend_Measure sub ($object $object)

- $object $object: object of same unit type

toString (line 260)

Returns a string representation

- access: public

string toString ()
__toString (line 271)

Returns a string representation

- access: public

string __toString ()

Documentation generated on Wed, 21 Feb 2007 11:45:07 -0800 by phpDocumentor 1.3.1