Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Abstract class for all measurements
string $_locale = 'null'
Locale identifier
string $_type = ''
Original type for this unit
$_units = 'array'
Unit types for this measurement
string $_value = ''
Plain value in standard unit
__construct(
$value $value, $type $type
=
null, $locale $locale
=
null
)
:
Zend_Measure_Abstract is an abstract class for the different measurement types
__toString(
)
:
string
Returns a string representation
add(
Zend_Measure_Abstract $object
)
:
Zend_Measure_Abstract
Adds an unit to another one
compare(
Zend_Measure_Abstract $object
)
:
boolean
Compares two units
convertTo(
string $type, integer $round
=
2, string|Zend_Locale $locale
=
null
)
:
string
Alias function for setType returning the converted unit
equals(
Zend_Measure_Abstract $object
)
:
boolean
Compare if the value and type is equal
getConversionList(
)
:
array
Returns the conversion list
getLocale(
)
:
string
Returns the actual set locale
getType(
)
:
type
Returns the original type
getValue(
integer $round
=
1, string|Zend_Locale $locale
=
null
)
:
integer|string
Returns the internal value
setLocale(
string|Zend_Locale $locale
=
null, boolean $check
=
false
)
:
Zend_Measure_Abstract
Sets a new locale for the value representation
setType(
string $type
)
:
Zend_Measure_Abstract
Set a new type, and convert the value
setValue(
integer|string $value, string $type
=
null, string|Zend_Locale $locale
=
null
)
:
Zend_Measure_Abstract
Set a new value
sub(
Zend_Measure_Abstract $object
)
:
Zend_Measure_Abstract
Substracts an unit from another one
toString(
integer $round
=
1, string|Zend_Locale $locale
=
null
)
:
string
Returns a string representation