MIOLO20
|
Membros públicos | |
CurrencyFormatter () | |
format ( $amount, $ISOCode) | |
formatWithSymbol ( $amount, $ISOCode) | |
validate ( $amount, $ISOCode) | |
toDecimal ( $amount, $ISOCode) | |
toDecimalForStyle ( $amount, $style) | |
supportsISOCode ( $ISOCode) | |
getFormattingStyles () | |
getISOCodes () | |
getStyleForISOCode ( $ISOCode) | |
getSymbol ( $ISOCode) | |
symbolIsAfterAmount ( $ISOCode) | |
getPrefixSuffixArray ( $ISOCode) | |
removePrefixAndSuffix ( $amount, $ISOCode) | |
getSeparators ( $style) | |
validateForStyle ( $amount, $style) | |
formatWithStyle ( $amount, $style) | |
Campos de Dados | |
$formattingStyles | |
$ISOCodeStyles | |
$nonDollarSymbols | |
$currenciesWithSymbolsAfterAmount | |
Definido na linha 40 do ficheiro mcurrencyformatter.class.
Sets up the instance variables. Must be called for the object to operate correctly. @access public
Definido na linha 153 do ficheiro mcurrencyformatter.class.
format | ( | $amount, | |
$ISOCode ) |
Returns the specified amount formatted according to the formatting style used for the specified ISO 4217 currency code.
@access public
double | $amount | The amount to be formatted. |
string | $ISOCode | ISO 4217 currency code. |
Reimplementado em MCurrencyFormatter.
Definido na linha 167 do ficheiro mcurrencyformatter.class.
formatWithStyle | ( | $amount, | |
$style ) |
Returns the specified amount formatted according to the specified formatting style.
@access public
double | $amount | The amount to be formatted. |
string | $style | The style to be used for formatting. |
Definido na linha 465 do ficheiro mcurrencyformatter.class.
formatWithSymbol | ( | $amount, | |
$ISOCode ) |
Returns the specified amount formatted according to the formatting style used for the specified ISO 4217 currency code with the currency symbol included.
Reimplementado em MCurrencyFormatter.
Definido na linha 179 do ficheiro mcurrencyformatter.class.
getFormattingStyles | ( | ) |
Returns an hashtable of the supported formatting styles. @access public
Definido na linha 264 do ficheiro mcurrencyformatter.class.
getISOCodes | ( | ) |
Returns an array of the supported ISO 4217 codes. @access public
Definido na linha 275 do ficheiro mcurrencyformatter.class.
getPrefixSuffixArray | ( | $ISOCode | ) |
Convenience function that returns an array with two elements: a prefix and a suffix. eg. list($prefix, $suffix) = $cf->getPrefixSuffixArray( "AUD" ); echo $prefix.$cf->format( 9999.95, "AUD" ).$suffix; // outputs "$9,999.95"*
@access public
string | $ISOCode | ISO 4217 currency code. |
Definido na linha 356 do ficheiro mcurrencyformatter.class.
getSeparators | ( | $style | ) |
Returns a two element array that contains the thousands separator and the the decimal place separator respectively for the specified formatting style.
@access private
string | $style | The formatting style to be used. |
Definido na linha 397 do ficheiro mcurrencyformatter.class.
getStyleForISOCode | ( | $ISOCode | ) |
Returns the key of the formatting style used for the specified ISO 4217 currency code.
@access public
string | $ISOCode | ISO 4217 currency code. |
Definido na linha 296 do ficheiro mcurrencyformatter.class.
getSymbol | ( | $ISOCode | ) |
Returns the symbol (ie. '$' or 'Y') for the specified ISO 4217 currency code.
@access public
string | $ISOCode | ISO 4217 currency code. |
Definido na linha 310 do ficheiro mcurrencyformatter.class.
removePrefixAndSuffix | ( | $amount, | |
$ISOCode ) |
Removes the prefix and suffix from an $amount formatted for the specified $ISOCode. @access public
double | $amount | |
string | $ISOCode |
Definido na linha 380 do ficheiro mcurrencyformatter.class.
supportsISOCode | ( | $ISOCode | ) |
Checks to see if the formatting for the specified code is supported.
string | $ISOCode | ISO 4217 currency code. @access public |
Definido na linha 250 do ficheiro mcurrencyformatter.class.
symbolIsAfterAmount | ( | $ISOCode | ) |
Returns true if the symbol for the specified ISO 4217 currency code should be displayed after (to the right of) the amount.
@access public
string | $ISOCode | ISO 4217 currency code. |
Definido na linha 330 do ficheiro mcurrencyformatter.class.
toDecimal | ( | $amount, | |
$ISOCode ) |
Returns the decimal amount represented by the amount according to the formatting style used for the specified ISO 4217 currency code.
@access public
double | $amount | The amount to be validated. |
string | $ISOCode | ISO 4217 currency code. |
Reimplementado em MCurrencyFormatter.
Definido na linha 216 do ficheiro mcurrencyformatter.class.
toDecimalForStyle | ( | $amount, | |
$style ) |
Returns the decimal amount represented by the amount according to the specified formatting style.
@access public
double | $amount | The amount to be validated. |
string | $style | The formatting style to be used. |
Definido na linha 233 do ficheiro mcurrencyformatter.class.
validate | ( | $amount, | |
$ISOCode ) |
Validates whether the specified amount is properly formatted according to the formatting style used for the specified ISO 4217 currency code. Returns true if the specified amount is properly formatted.
@access public
double | $amount | The amount to be validated. |
string | $ISOCode | ISO 4217 currency code. |
Reimplementado em MCurrencyFormatter.
Definido na linha 198 do ficheiro mcurrencyformatter.class.
validateForStyle | ( | $amount, | |
$style ) |
Validates whether the specified amount is properly formatted according to the specified formatting style. Returns true if the specified amount is properly formatted.
@access public
double | $amount | The amount to be validated. |
string | $style | The formatting style to validate. |
Definido na linha 445 do ficheiro mcurrencyformatter.class.
$currenciesWithSymbolsAfterAmount |
A list of the ISO 4217 currency codes that have their symbol displayed after the amount.
Definido na linha 143 do ficheiro mcurrencyformatter.class.
$formattingStyles |
A list of all the supported currency formatting styles.
Definido na linha 46 do ficheiro mcurrencyformatter.class.
$ISOCodeStyles |
A hashtable that maps the supported ISO 4217 currency codes to the formatting style to be used for amounts in that currency.
Definido na linha 61 do ficheiro mcurrencyformatter.class.
$nonDollarSymbols |
A list of all the supported ISO 4217 currency codes that don't have a dollar sign as their symbol.
Definido na linha 106 do ficheiro mcurrencyformatter.class.