Zend Framework
1.12
|
Public Member Functions | |
__construct ($value, $type, $locale=null) | |
Zend_Measure_Abstract is an abstract class for the different measurement types. | |
setValue ($value, $type=null, $locale=null) | |
Set a new value. | |
setType ($type) | |
Set a new type, and convert the value. | |
convertTo ($type, $round=0, $locale=null) | |
Alias function for setType returning the converted unit Default is 0 as this class only handles numbers without precision. | |
![]() | |
__construct ($value, $type=null, $locale=null) | |
Zend_Measure_Abstract is an abstract class for the different measurement types. | |
getLocale () | |
Returns the actual set locale. | |
setLocale ($locale=null, $check=false) | |
Sets a new locale for the value representation. | |
getValue ($round=-1, $locale=null) | |
Returns the internal value. | |
setValue ($value, $type=null, $locale=null) | |
Set a new value. | |
getType () | |
Returns the original type. | |
setType ($type) | |
Set a new type, and convert the value. | |
equals ($object) | |
Compare if the value and type is equal. | |
toString ($round=-1, $locale=null) | |
Returns a string representation. | |
__toString () | |
Returns a string representation. | |
getConversionList () | |
Returns the conversion list. | |
convertTo ($type, $round=2, $locale=null) | |
Alias function for setType returning the converted unit. | |
add ($object) | |
Adds an unit to another one. | |
sub ($object) | |
Substracts an unit from another one. | |
compare ($object) | |
Compares two units. | |
Public Attributes | |
const | STANDARD = 'DECIMAL' |
const | BINARY = 'BINARY' |
const | TERNARY = 'TERNARY' |
const | QUATERNARY = 'QUATERNARY' |
const | QUINARY = 'QUINARY' |
const | SENARY = 'SENARY' |
const | SEPTENARY = 'SEPTENARY' |
const | OCTAL = 'OCTAL' |
const | NONARY = 'NONARY' |
const | DECIMAL = 'DECIMAL' |
const | DUODECIMAL = 'DUODECIMAL' |
const | HEXADECIMAL = 'HEXADECIMAL' |
const | ROMAN = 'ROMAN' |
Protected Attributes | |
$_units | |
![]() | |
$_value | |
Plain value in standard unit. | |
$_type | |
Original type for this unit. | |
$_locale = null | |
Locale identifier. | |
$_units = array() | |
Unit types for this measurement. | |
__construct | ( | $value, | |
$type, | |||
$locale = null |
|||
) |
Zend_Measure_Abstract is an abstract class for the different measurement types.
integer | $value | Value |
string | $type | (Optional) A Zend_Measure_Number Type |
string | Zend_Locale | $locale | (Optional) A Zend_Locale |
Zend_Measure_Exception | When language is unknown |
Zend_Measure_Exception | When type is unknown |
convertTo | ( | $type, | |
$round = 0 , |
|||
$locale = null |
|||
) |
Alias function for setType returning the converted unit Default is 0 as this class only handles numbers without precision.
string | $type | Type to convert to |
integer | $round | (Optional) Precision to add, will always be 0 |
setType | ( | $type | ) |
Set a new type, and convert the value.
string | $type | New type to set |
Zend_Measure_Exception | When a unknown type is given |
setValue | ( | $value, | |
$type = null , |
|||
$locale = null |
|||
) |
Set a new value.
integer | $value | Value |
string | $type | (Optional) A Zend_Measure_Number Type |
string | Zend_Locale | $locale | (Optional) A Zend_Locale Type |
Zend_Measure_Exception |
|
protected |
const BINARY = 'BINARY' |
const DECIMAL = 'DECIMAL' |
const DUODECIMAL = 'DUODECIMAL' |
const HEXADECIMAL = 'HEXADECIMAL' |
const NONARY = 'NONARY' |
const OCTAL = 'OCTAL' |
const QUATERNARY = 'QUATERNARY' |
const QUINARY = 'QUINARY' |
const ROMAN = 'ROMAN' |
const SENARY = 'SENARY' |
const SEPTENARY = 'SEPTENARY' |
const STANDARD = 'DECIMAL' |
const TERNARY = 'TERNARY' |