Caution: The documentation you are viewing is
for an older version of Zend Framework.
You can find the documentation of the current version at docs.zendframework.com
Outputting measurements - Zend_Measure
Measurements can be output in a number of different ways.
Zend_Measure supports outputting of strings automatically.
Example #1 Automatic output
The value of a measurement can be output using getValue().
Example #2 Output a value
The getValue() method accepts an optional parameter
round' which allows to define a precision for the generated output. The
standard precision is '
The function getType() returns the current unit of measurement.
Example #3 Outputting units
Outputting a string in a format common in the users' country is usually desirable. For example, the measurement "1234567.8" would become "1.234.567,8" for Germany. This functionality will be supported in a future release.