eZPublish  4.4
eZCurrencyConverter Class Reference

Handles conversions from one curreny into another, applying rounding if it's needed. More...

Public Member Functions

 convert ($fromCurrency, $toCurrency, $value, $applyRounding=true)
 
 convertFromLocaleCurrency ($toCurrency, $value, $applyRounding=true)
 
 crossRate ($fromCurrency, $toCurrency)
 
 currencyList ()
 
 eZCurrencyConverter ()
 
 mathHandler ()
 
 rateValue ($currencyCode)
 
 roundingPrecision ()
 
 roundingTarget ()
 
 roundingType ()
 
 setMathHandler ($handler)
 
 setRoundingPrecision ($precision)
 
 setRoundingTarget ($target)
 
 setRoundingType ($type)
 

Static Public Member Functions

static instance ()
 Returns a shared instance of the eZCurrencyConverter class. More...
 

Public Attributes

 $CurrencyList
 
 $MathHandler
 
 $RoundingPrecision
 
 $RoundingTarget
 
 $RoundingType
 
const ROUNDING_TYPE_CEIL = 3
 
const ROUNDING_TYPE_FLOOR = 4
 
const ROUNDING_TYPE_NONE = 1
 
const ROUNDING_TYPE_ROUND = 2
 

Detailed Description

Handles conversions from one curreny into another, applying rounding if it's needed.

Member Function Documentation

eZCurrencyConverter::convert (   $fromCurrency,
  $toCurrency,
  $value,
  $applyRounding = true 
)
Returns
converted value for $value form $fromCurrency to $toCurrency. Applyes rounding if needed.

Referenced by convertFromLocaleCurrency().

eZCurrencyConverter::convertFromLocaleCurrency (   $toCurrency,
  $value,
  $applyRounding = true 
)
Returns
converted value for $value form currency specified in locale to $toCurrency. Applyes rounding if needed.
eZCurrencyConverter::crossRate (   $fromCurrency,
  $toCurrency 
)

Referenced by convert().

eZCurrencyConverter::currencyList ( )

Referenced by rateValue().

eZCurrencyConverter::eZCurrencyConverter ( )

Referenced by instance().

static eZCurrencyConverter::instance ( )
static
eZCurrencyConverter::mathHandler ( )

Referenced by convert(), and crossRate().

eZCurrencyConverter::rateValue (   $currencyCode)

Referenced by crossRate().

eZCurrencyConverter::roundingPrecision ( )

Referenced by convert().

eZCurrencyConverter::roundingTarget ( )

Referenced by convert().

eZCurrencyConverter::roundingType ( )

Referenced by convert().

eZCurrencyConverter::setMathHandler (   $handler)

Referenced by eZCurrencyConverter(), and mathHandler().

eZCurrencyConverter::setRoundingPrecision (   $precision)
eZCurrencyConverter::setRoundingTarget (   $target)
eZCurrencyConverter::setRoundingType (   $type)

Member Data Documentation

eZCurrencyConverter::$CurrencyList

Referenced by currencyList().

eZCurrencyConverter::$MathHandler

Referenced by mathHandler().

eZCurrencyConverter::$RoundingPrecision

Referenced by roundingPrecision().

eZCurrencyConverter::$RoundingTarget

Referenced by roundingTarget().

eZCurrencyConverter::$RoundingType

Referenced by roundingType().

const eZCurrencyConverter::ROUNDING_TYPE_CEIL = 3
const eZCurrencyConverter::ROUNDING_TYPE_FLOOR = 4
const eZCurrencyConverter::ROUNDING_TYPE_NONE = 1
const eZCurrencyConverter::ROUNDING_TYPE_ROUND = 2

The documentation for this class was generated from the following file: