Sunnysideup\Ecommerce\Money\ExchangeRateProvider
Synopsis
class ExchangeRateProvider
{
- // members
- protected float $exchangeCostMultiplier = 1.05;
- private static array $_memory_cache = ;
- // methods
- public float ExchangeRate()
- protected float getRate()
Hierarchy
Uses
- SilverStripe\Core\Extensible
- SilverStripe\Core\Injector\Injectable
- SilverStripe\Core\Config\Configurable
Members
private
- $_memory_cache
—
array
cache of exchange rates.
protected
- $exchangeCostMultiplier
—
float
adds a bit of additional cost to account for the exchange cost.
Methods
protected
- getRate() — gets a rate from a FROM and a TO currency.
public
- ExchangeRate() — Get the exchange rate.