|
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
| __construct ($value, $type, $locale=null) | |
| setValue ($value, $type=null, $locale=null) | |
| setType ($type) | |
| convertTo ($type, $round=0, $locale=null) | |
Public Member Functions inherited from Zend_Measure_Abstract | |
| __construct ($value, $type=null, $locale=null) | |
| getLocale () | |
| setLocale ($locale=null, $check=false) | |
| getValue ($round=-1, $locale=null) | |
| setValue ($value, $type=null, $locale=null) | |
| getType () | |
| setType ($type) | |
| equals ($object) | |
| toString ($round=-1, $locale=null) | |
| __toString () | |
| getConversionList () | |
| convertTo ($type, $round=2, $locale=null) | |
| add ($object) | |
| sub ($object) | |
| compare ($object) | |
Data Fields | |
| 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 | |
Protected Attributes inherited from Zend_Measure_Abstract | |
| $_value | |
| $_type | |
| $_locale = null | |
| $_units = array() | |
Definition at line 39 of file Number.php.
| __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 |
Definition at line 145 of file Number.php.
| 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 |
Definition at line 415 of file Number.php.
| 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 |
Definition at line 393 of file Number.php.
| 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 |
Definition at line 187 of file Number.php.
|
protected |
Definition at line 61 of file Number.php.
| const BINARY = 'BINARY' |
Definition at line 43 of file Number.php.
| const DECIMAL = 'DECIMAL' |
Definition at line 51 of file Number.php.
| const DUODECIMAL = 'DUODECIMAL' |
Definition at line 52 of file Number.php.
| const HEXADECIMAL = 'HEXADECIMAL' |
Definition at line 53 of file Number.php.
| const NONARY = 'NONARY' |
Definition at line 50 of file Number.php.
| const OCTAL = 'OCTAL' |
Definition at line 49 of file Number.php.
| const QUATERNARY = 'QUATERNARY' |
Definition at line 45 of file Number.php.
| const QUINARY = 'QUINARY' |
Definition at line 46 of file Number.php.
| const ROMAN = 'ROMAN' |
Definition at line 54 of file Number.php.
| const SENARY = 'SENARY' |
Definition at line 47 of file Number.php.
| const SEPTENARY = 'SEPTENARY' |
Definition at line 48 of file Number.php.
| const STANDARD = 'DECIMAL' |
Definition at line 41 of file Number.php.
| const TERNARY = 'TERNARY' |
Definition at line 44 of file Number.php.